identifyImage() and connection reset

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
davidb2002
Posts: 37
Joined: 2008-09-01T08:31:26-07:00

identifyImage() and connection reset

Post by davidb2002 »

Using ImageMagick 6.2.8

I've come across an odd problem with the following code:

Code: Select all

    $image = new Imagick($real_location); 
    $ident = $image->identifyImage(); 
    $format = $ident['colorSpace'];
In most cases, this is fine. But on some photos it resets the connection and basically makes it look like the page has timed out.

An example photo is a JPG at 72dpi, 3008x2000, EXIF data included, RGB, 8Bit-channel.

If i run it like below, its fine:

Code: Select all

    exec("identify -format %r  ".$real_location,$output);
However, i would perfer to stay away from exec() and try to stick to the library if possible.

In my PHP error log i get the following:

Code: Select all

httpd: magick/option.c:1264: GetImageOption: Assertion `image_info != (ImageInfo *) ((void *)0)' failed.
[Mon Mar 26 15:40:26 2012] [notice] child pid 1582 exit signal Aborted (6)
Post Reply