ImagickException with message 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
mattmcla

ImagickException with message Wand contains no images

Post by mattmcla »

Uncaught exception 'ImagickException' with message 'Wand contains no images MagickWand-2

runing apache2, centos 5.3, php 5.1.6. I yum installed ImageMagic and pecl installed imagic. I've updated php.ini with the .so. The php source works fantastic on Ubuntu but bombs on centos. Has anyone seen this before?
mattmcla

Re: ImagickException with message Wand contains no images

Post by mattmcla »

So, I've tried to upgrade to php 5.2.9 and no dice. I read something where they may have been a conflict with php 5.1 and the latest version of image magick.

Is there a better place to put this thread or a forum where I might have better luck?
mattmcla

Re: ImagickException with message Wand contains no images

Post by mattmcla »

So no one's got anything?
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: ImagickException with message Wand contains no images

Post by mkoppanen »

Can you post the source code?
Mikko Koppanen
My blog: http://valokuva.org
gabimarius2

Re: ImagickException with message Wand contains no images

Post by gabimarius2 »

mattmcla wrote:The php source works fantastic on Ubuntu but bombs on centos. Has anyone seen this before?
I get the same error on a Debian server. i think the problem is with the imagick version. On one server I have installed 2.2.1-dev module version and it works great and on another server 2.3.0 module version and it doesn't work at all.

Does anyone have a solution other than a downgrade on the server??
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: ImagickException with message Wand contains no images

Post by mkoppanen »

There is nothing I can do without seeing the code.
Mikko Koppanen
My blog: http://valokuva.org
triffid_hunter

Re: ImagickException with message Wand contains no images

Post by triffid_hunter »

I am also experiencing this issue

Code: Select all

$ php <<< '<?php $p = new Imagick("Mendel.jpg");'

Fatal error: Uncaught exception 'ImagickException' with message 'Wand contains no images `MagickWand-1' @ magick-image.c/MagickSetImageFilename/9363' in /home/triffid/-:1
Stack trace:
#0 /home/triffid/-(1): Imagick->__construct('/home/triffid/M...')
#1 {main}
  thrown in /home/triffid/- on line 1
and yet

Code: Select all

$ convert Mendel.jpg Mendel.png
$ file Mendel.*
Mendel.jpg: JPEG image data, JFIF standard 1.01, comment: "Created with GIMP\377"
Mendel.png: PNG image, 2247 x 1512, 8-bit/color RGB, non-interlaced
$ 
triffid_hunter

Re: ImagickException with message Wand contains no images

Post by triffid_hunter »

Thought I should provide some versions:

ImageMagick 6.5.2-9 2009-10-11 Q16 OpenMP
PHP 5.2.11-pl0-gentoo
pecl-imagick-2.3.0
libjpeg-7
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: ImagickException with message Wand contains no images

Post by mkoppanen »

This error has been fixed in the trunk version of Imagick. The underlying error is that image reading fails but incorrect error message is displayed.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply