Page 1 of 1

convert: unable to open image 'logo.gif'

Posted: 2011-03-15T12:31:18-07:00
by mtrico08
I've installed ImageMagick 6.6.7 as well as the required imagick and ghostscript packages. I've confirmed using the identify -version command that ImageMagick is installed and I've confirmed using the site's php info page, that imagick is enabled. However, when I run the command "convert logo: logo.gif", I get the following error:

convert: unable to open image 'logo.gif' : @ error/blobl.c/OpenBlob/2587

Also, Here's another message I got from a command provided at http://www.imagemagick.org/script/convert.php:

convert: unable to open image 'rose.jpg': @error/blob.c/OpenBlob/2587.
convert: no decode delegate for this image format 'rose.jpg' @ error/constitute.c/ReadImage/532.
convert: missing an image filename 'rose.png' @ error/convert/c/ConvertImageCommand/2962

I attempted some of the solutions I saw that was used by other developers in older topics but nothing seems to work. Any ideas? Your help is greatly appreciated.

FYI, server is Linux CentOS

Thanks!

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-16T19:45:55-07:00
by anthony
The directory the PHP is writing the image must be writable by the user PHP is running as. This is typically a special 'low permissions' user as a security precaution. Try having PHP write the image in /tmp instead.

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-20T18:13:56-07:00
by mtrico08
Thanks Anthony,

I checked out and changed permissions though I am now getting the following errors:

missing delegates bzlib djvu fontconfig freetype gvc jpeg jp2 lcms openexr png rsvg tiff wmf x11 xml zlib

Any ideas?

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-20T18:23:59-07:00
by anthony
Your environment is not right for your installation.
Perhaps IM needs a MAGICK_HOME or LD_LIBRARY_PATH environment variable?

Basically it is not finding the 'coder' modules.

One technique to fix this is to use a script to set the environment and then call the command you specify.
See the script at the end of http://www.imagemagick.org/Usage/api/#personal

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-23T10:42:05-07:00
by mtrico08
Thanks Anthony, we're looking into this.

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-29T09:53:18-07:00
by mtrico08
It turned out being a bad installation of ImageMagick. The convert logo command still does not work properly but the other commands seem to work fine. We have some problems with imagick though, where we get the following errors:

Fatal Error : call to undefined methods Imagick::setImageOpacity()
Fatal Error : uncaught exception "' ImagickException' with message permission denied to FILENAME

If you have any idea what's causing this, please let us know, otherwise I appreciate your help on the previous issue.

Re: convert: unable to open image 'logo.gif'

Posted: 2011-03-29T21:41:18-07:00
by anthony
That looks like a PHP library error. Perhaps with the PECL interface.

Note that the PECL imagick interface may also need to be built to match your installed version ImageMagick.
A binary install may not work if the expected libraries don't match.

Re: convert: unable to open image 'logo.gif'

Posted: 2011-04-26T09:05:45-07:00
by mtrico08
Thanks Anthony, we were able to resolve this issue. There turned out being a large number of issues with the initial installation. When we uninstalled it and reinstalled using yum install, we solved some of the issues and then had to use chown command with user and group apache. We then were able to use folder permissions 755 as well. These solved the remaining problems.