? .imageapi.module.swp ? imageapi_gd.patch Index: imageapi.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi.module,v retrieving revision 1.23.2.3 diff -u -p -r1.23.2.3 imageapi.module --- imageapi.module 18 Mar 2009 08:35:59 -0000 1.23.2.3 +++ imageapi.module 6 Nov 2009 14:02:59 -0000 @@ -161,7 +161,7 @@ function imageapi_default_toolkit() { function imageapi_toolkit_invoke($method, &$image, array $params = array()) { $function = $image->toolkit . '_image_' . $method; if (function_exists($function)) { - array_unshift($params, $image); + array_unshift($params, &$image); return call_user_func_array($function, $params); } watchdog('imageapi', 'The selected image handling toolkit %toolkit can not correctly process %function.', array('%toolkit' => $image->toolkit, '%function' => $function), WATCHDOG_ERROR); Index: imageapi_gd.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi_gd.module,v retrieving revision 1.13.2.7 diff -u -p -r1.13.2.7 imageapi_gd.module --- imageapi_gd.module 17 Apr 2009 00:15:21 -0000 1.13.2.7 +++ imageapi_gd.module 6 Nov 2009 14:03:00 -0000 @@ -92,7 +92,7 @@ function imageapi_gd_image_close($image, * @return * TRUE or FALSE, based on success. */ -function imageapi_gd_image_crop(&$image, $x, $y, $width, $height) { +function imageapi_gd_image_crop($image, $x, $y, $width, $height) { $res = imageapi_gd_create_tmp($image, $width, $height); if (!imagecopyresampled($res, $image->resource, 0, 0, $x, $y, $width, $height, $width, $height)) { @@ -120,7 +120,7 @@ function imageapi_gd_image_crop(&$image, * @return * TRUE or FALSE, based on success. */ -function imageapi_gd_image_resize(&$image, $width, $height) { +function imageapi_gd_image_resize($image, $width, $height) { $res = imageapi_gd_create_tmp($image, $width, $height); if (!imagecopyresampled($res, $image->resource, 0, 0, 0, 0, $width, $height, $image->info['width'], $image->info['height'])) { @@ -152,7 +152,7 @@ function imageapi_gd_image_resize(&$imag * @return * TRUE or FALSE, based on success. */ - function imageapi_gd_image_rotate(&$image, $degrees, $background) { + function imageapi_gd_image_rotate($image, $degrees, $background) { // PHP installations using non-bundled GD do not have imagerotate. if (!function_exists('imagerotate')) { require_once drupal_get_path('module', 'imageapi_gd') .'/imagerotate.inc'; @@ -202,7 +202,7 @@ function imageapi_gd_image_resize(&$imag return TRUE; } -function imageapi_gd_image_sharpen(&$image, $radius, $sigma, $amount, $threshold) { +function imageapi_gd_image_sharpen($image, $radius, $sigma, $amount, $threshold) { $threshold = round($threshold * 255); $image->resource = imageapi_gd_unsharp_mask($image->resource, $radius, $sigma, $amount, $threshold); return TRUE; @@ -218,7 +218,7 @@ function imageapi_gd_image_sharpen(&$ima * @return * TRUE or FALSE, based on success. */ -function imageapi_gd_image_desaturate(&$image) { +function imageapi_gd_image_desaturate($image) { // PHP installations using non-bundled GD do not have imagefilter. if (!function_exists('imagefilter')) { require_once drupal_get_path('module', 'imageapi_gd') .'/imagefilter.inc'; Index: imageapi_imagemagick.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imageapi/imageapi_imagemagick.module,v retrieving revision 1.17.2.4 diff -u -p -r1.17.2.4 imageapi_imagemagick.module --- imageapi_imagemagick.module 17 Apr 2009 17:58:03 -0000 1.17.2.4 +++ imageapi_imagemagick.module 6 Nov 2009 14:03:00 -0000 @@ -105,21 +105,21 @@ function imageapi_imagemagick_image_clos return _imageapi_imagemagick_convert($image->source, $dst, $image->ops); } -function imageapi_imagemagick_image_crop(&$image, $x, $y, $width, $height) { +function imageapi_imagemagick_image_crop($image, $x, $y, $width, $height) { $image->ops[] = '-crop '. (int) $width .'x'. (int) $height .'+'. (int) $x .'+'. (int) $y .'!'; $image->info['width'] = $width; $image->info['height'] = $height; return TRUE; } -function imageapi_imagemagick_image_resize(&$image, $width, $height) { +function imageapi_imagemagick_image_resize($image, $width, $height) { $image->ops[] = '-resize '. (int) $width .'x'. (int) $height .'!'; $image->info['width'] = $width; $image->info['height'] = $height; return TRUE; } -function imageapi_imagemagick_image_rotate(&$image, $degrees, $bgcolor) { +function imageapi_imagemagick_image_rotate($image, $degrees, $bgcolor) { if (is_int($bgcolor)) { $bgcolor = '#'. str_pad(dechex($bgcolor), 6, 0); } @@ -130,13 +130,13 @@ function imageapi_imagemagick_image_rota return TRUE; } -function imageapi_imagemagick_image_sharpen(&$image, $radius, $sigma, $amount, $threshold) { +function imageapi_imagemagick_image_sharpen($image, $radius, $sigma, $amount, $threshold) { $unsharp_arg = $radius .'x'. $sigma .'+'. $amount/100 .'+'. $threshold; $image->ops[] = '-unsharp '. $unsharp_arg; return TRUE; } -function imageapi_imagemagick_image_desaturate(&$image) { +function imageapi_imagemagick_image_desaturate($image) { $image->ops[] = '-colorspace GRAY'; return TRUE; }