ImageMagick lacks decoding delegates

I recently switched to MediaTemple and installed ImageMagick and IMagick after their blog article here .

There is no correct installation of the error module and phpinfo ().

When I try to use IM on a JPG image via PHP, I get this error

Uncaught exception 'ImagickException' with message 'no decode delegate for this image format /home/149263/domains/wer.com/html/images/pictures/post/tmp/original/' @ error/constitute.c/ReadImage/544' in /nfs/c10/h04/mnt/149263/domains/wer.com/html/application/controllers/post.php:301 Stack trace: #0 /nfs/c10/h04/mnt/149263/domains/wer.com/html/application/controllers/post.php(301): Imagick->__construct('/home/149263/do...') #1 [internal function]: Post->filter('punch') #2 /nfs/c10/h04/mnt/149263/domains/wer.com/html/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array) #3 /nfs/c10/h04/mnt/149263/domains/wer.com/html/index.php(217): require_once('/nfs/c10/h04/mn...') #4 {main} thrown in /nfs/c10/h04/mnt/149263/domains/wer.com/html/application/controllers/post.php on line 301 

However, convert -list configure returns

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

and identify -list format returns

 JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (62) JPG* JPEG rw- Joint Photographic Experts Group JFIF format 

So, it looks like the installation is correct.

 ImageMagick 6.7.7-0 2012-05-22 imagick module version 3.1.0RC1 

Any suggestions for troubleshooting?

+3
php imagemagick imagick
source share
2 answers

It's quick and dirty here when installing the latest version (version 6.8.4-6 at the time of this writing) ImageMagick on Ubuntu 12.04.

Start by uninstalling old versions previously installed with apt-get:

sudo apt-get remove imagemagick

Then update apt-get and install some supporting packages:

 sudo apt-get update sudo apt-get install libperl-dev gcc libjpeg-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz pkg-config 

Use wget to capture the source from ImageMagick.org.

After downloading the source, unzip it:

 tar -xzf ImageMagick.tar.gz 

Now configure and run:

 cd ImageMagick-6.8.4-6 ./configure sudo make sudo make install 

To avoid an error, for example:

 convert: error while loading shared libraries: libMagickCore.so.2: cannot open shared object file: No such file or directory 

Add the following line to ~/.bashrc :

 export LD_LIBRARY_PATH=/usr/local/lib 

Update. If you still get an error similar to the above, try running ldconfig:

 sudo ldconfig 

You can confirm the installation and available formats with:

 identify -list format 
+9
source share

Have you tried to run some code using Imagemagick via exec () to find out if there is a problem with Imagemagick or Imagick?

0
source share

All Articles