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.

convert: unable to open image 'logo.gif'

Postby mtrico08 » 2011-03-15T12:31:18+00:00

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!
mtrico08
 
Posts: 7
Joined: 2011-03-15T12:25:06+00:00

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

Postby anthony » 2011-03-16T19:45:55+00:00

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
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 8729
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia

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

Postby mtrico08 » 2011-03-20T18:13:56+00:00

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?
mtrico08
 
Posts: 7
Joined: 2011-03-15T12:25:06+00:00

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

Postby anthony » 2011-03-20T18:23:59+00:00

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
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 8729
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia

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

Postby mtrico08 » 2011-03-23T10:42:05+00:00

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

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

Postby mtrico08 » 2011-03-29T09:53:18+00:00

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.
mtrico08
 
Posts: 7
Joined: 2011-03-15T12:25:06+00:00

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

Postby anthony » 2011-03-29T21:41:18+00:00

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
http://www.imagemagick.org/Usage/
User avatar
anthony
 
Posts: 8729
Joined: 2004-05-31T19:27:03+00:00
Location: Brisbane, Australia

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

Postby mtrico08 » 2011-04-26T09:05:45+00:00

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.
mtrico08
 
Posts: 7
Joined: 2011-03-15T12:25:06+00:00


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests