convert: unable to open image 'logo.gif'

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mtrico08
Posts: 7
Joined: 2011-03-15T12:25:06-07:00
Authentication code: 8675308

convert: unable to open image 'logo.gif'

Post 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!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mtrico08
Posts: 7
Joined: 2011-03-15T12:25:06-07:00
Authentication code: 8675308

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

Post 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?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mtrico08
Posts: 7
Joined: 2011-03-15T12:25:06-07:00
Authentication code: 8675308

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

Post by mtrico08 »

Thanks Anthony, we're looking into this.
mtrico08
Posts: 7
Joined: 2011-03-15T12:25:06-07:00
Authentication code: 8675308

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mtrico08
Posts: 7
Joined: 2011-03-15T12:25:06-07:00
Authentication code: 8675308

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

Post 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.
Post Reply