ImagickException - Wand contains no images

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
rajamcasoft

ImagickException - Wand contains no images

Post by rajamcasoft »

I have installed imagick extension with version 6.5.6. I am getting the below error message while I am trying to read the image:

exception 'ImagickException' with message 'Wand contains no images `MagickWand-2' @ magick-image.c/MagickSetImageFilename/9789' in /home/mydomain/www/photosfolder/uploadimagesxx.php:817 Stack trace:
#0 /home/mydomain/photosfolder/uploadimagesxx.php(817): Imagick->readimage('/home/mydomain/www...') #1 /home/mydomain/photosfolder/uploadimagesxx.php(262): reSizePhoto('/home/mydomain/www...', 'ashjahjjimage...', 450, 450) #2 {main}

Code:
$imagickr = new Imagick();
$imagickr->readImage($imagenamefullpath);

Platform : Linux
PHP Version: 5.2.3
Suggest a solution for this.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: ImagickException - Wand contains no images

Post by mkoppanen »

Fixed with later versions of Imagick (3.x). The earlier versions show wrong error message.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply