--- imagecache_actions/imagecache_customactions.module 2008-11-09 08:33:54.000000000 -0600 +++ imagecache_customactions.module 2009-03-26 13:32:11.050000000 -0500 @@ -37,7 +37,7 @@ * * $image->info array * - * $image->res handle on the image object + * $image->resource handle on the image object * * @param $action array of settings as defined in your form. */ @@ -77,7 +77,7 @@ '#description' => t('

Enter PHP code for your custom action. Source image is available in the $image object which contains an $image->info array, - and a $image->res which is the php toolkit object itself. + and a $image->resource which is the php toolkit object itself. Your code must return an image object of the same structure (see ImageAPI). For convenience, the images current $image->info variables - $width, $height are available in the current scope. @@ -92,12 +92,12 @@ // Make a copy of the image twice the size $height2 = $height * 2; $width2 = $width * 2; $img2 = imagecreatetruecolor($width2, $height2); - imagecopyresampled($img2, $image->res, 0, 0, $x, $y, $width2, $height2, $width, $height); + imagecopyresampled($img2, $image->resource, 0, 0, $x, $y, $width2, $height2, $width, $height); // Wave it for($i = 0; $i < ($width2); $i += 2) imagecopy($img2, $img2, $x+$i-2, $y+sin($i/$period)*$amplitude, $x+$i, $y, 2, $height2); // Resample it down again - imagecopyresampled($image->res, $img2, $x, $y, 0, 0, $width, $height, $width2, $height2); + imagecopyresampled($image->resource, $img2, $x, $y, 0, 0, $width, $height, $width2, $height2); imagedestroy($img2); return $image;