Wand contains no images error

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
mtwalsh
Posts: 2
Joined: 2009-11-12T14:29:00-07:00
Authentication code: 8675309

Wand contains no images error

Post by mtwalsh »

Hi,

We'd really love to be able to use ImageMagick as it would be extremely useful

across several projects, however we keep receiving the same error.

This is the code we're using just to test ImageMagick:

Code: Select all

if(file_exists('content/pl100.jpg')) {
    try {
        $im = new imagick('content/pl100.jpg');
    } catch (Exception $e) {
        echo 'Caught exception: ',  $e->getMessage(), "\n";
    }
}
And this is the error:

Caught exception: Wand contains no images `MagickWand-1' @ magick-

image.c/MagickSetImageFilename/9789

then, on refresh...

Caught exception: Wand contains no images `MagickWand-2' @ magick-

image.c/MagickSetImageFilename/9789

This repeats with the number incrementing each time so 'MagickWand-3',

'MagickWand-4', etc.

ImageMagick version - 6.5.7-5
Imagick version - 2.3.1-dev and shows in phpinfo.
Windows Server 2003 SP2
PHP 5.3.0

We'd really appreciate any advice and any suggestions on things we should check.

Thanks for looking.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Wand contains no images error

Post by magick »

We don't have access to Windows right now, however, your script worked without complaint on our Linux system with ImageMagick 6.5.7-7, imagick 2.2.2-2, and PHP 5.2.9.
mtwalsh
Posts: 2
Joined: 2009-11-12T14:29:00-07:00
Authentication code: 8675309

Re: Wand contains no images error

Post by mtwalsh »

Hi Magick,

Thanks for your response, I'm glad the script works.

At the moment we're looking into EXEC permissions as this might be where the problem lies.

I'll post back here if we find a solution.

Thanks.
shar10dul
Posts: 4
Joined: 2010-01-18T14:03:16-07:00
Authentication code: 8675309

Re: Wand contains no images error

Post by shar10dul »

hi,
I am running a ubuntu machice and i too am having the same problem.
just the use of the line:

Code: Select all

 $im = new Imagick("example.jpeg");
throws the error mentioned by the original poster.

I looked all around on web but couldn't find a solution.
Post Reply