This error suddenly appeared last Friday. It has been working fine and Now:
Warning: magickwriteimage() expects parameter 1 to be resource, boolean given
Here's the code I use:
// Invoke ImageMagick
$image = NewMagickWand();
MagickReadImage($image, $upload_dir . '/' . $filename);
// Generate the full size image
$image = MagickTransformImage($image, '0x0', '500x500');
MagickWriteImage($image, $upload_dir . '/' . $filename);
Has anyone seen this error? Any help is appreciated!
Warning: magickwriteimage() expects parameter 1
Re: Warning: magickwriteimage() expects parameter 1
Check for exceptions. Chances are the image is not being read so subsequent API calls fails since the image resource is not defined.
Re: Warning: magickwriteimage() expects parameter 1
Thanks for your reply. The resource is defined, then dies for some reason:
// Invoke ImageMagick
$image = NewMagickWand();
MagickReadImage($image, $upload_dir . '/' . $filename);
echo($image); // echoes "Resource#9"
// Generate the full size image
$image = MagickTransformImage($image, '0x0', '500x500'); // dies right here. the resource disappears...
echo($image);// doesn't print out at all
MagickWriteImage($image, $upload_dir . '/' . $filename);
// Invoke ImageMagick
$image = NewMagickWand();
MagickReadImage($image, $upload_dir . '/' . $filename);
echo($image); // echoes "Resource#9"
// Generate the full size image
$image = MagickTransformImage($image, '0x0', '500x500'); // dies right here. the resource disappears...
echo($image);// doesn't print out at all
MagickWriteImage($image, $upload_dir . '/' . $filename);
Re: Warning: magickwriteimage() expects parameter 1
Hmmm, not sure why its dying. We tried a script similar to yours and it worked without complaint. We're using MagickWand for PHP 1.0.7 and ImageMagick 6.6.2-6.
Re: Warning: magickwriteimage() expects parameter 1
odd...
I'm using the following:
magickWand version: 1.0.7
ImageMagick version: 6.4.2 08/14/08 Q16
I'm using the following:
magickWand version: 1.0.7
ImageMagick version: 6.4.2 08/14/08 Q16