Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php5-imagick on Ubuntu 14.04

I've spent quite some time googling for this issue, but to no avail, so I was hoping to get some help out here.

I'm using Ubuntu 14.04 and I've installed php5-imagick, ImageMagick and some extra libs for it to function. Testing the installation from the command line works perfectly and all delegates are installed according to 'convert -list configure' (output shown below).

It was working and performing perfectly before. The only thing I can think of is some system/security updates of Ubuntu. My code nor the IM installation were changed by any user actions before this error showed up.

The problem is when I call Imagick from my PHP script, it shows this error:

#420: no decode delegate for this image format '/' @ error/constitute.c/ReadImage/544

This error is shown for both JPG and PNG.

Any help is greatly appreciated!


Output of 'convert -version':

Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

Output of 'convert -list configure':

DELEGATES     bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib
LIBS          -lMagickCore -llcms2 -ltiff -lfreetype -ljpeg -llqr-1 -lglib-2.0 -lfftw3 -lfontconfig -lfreetype -lXext -lSM -lICE -lX11 -lXt -llzma -lbz2 -lz -lm -lgomp -lpthread -lltdl
like image 523
pixelsforbreakfast Avatar asked Nov 10 '22 00:11

pixelsforbreakfast


1 Answers

I think the problem here is that Imagemagick isn't configured to support SVG. Installing basic php5-imagick package doesn't bring in some extras which you'll need for doing this.

To install support for SVG in PHP Imagick type the following into a terminal on the server in question:

sudo apt-get update
sudo apt-get install libmagickcore5-extra

Apt will list a load of dependent packages, including SVG libraries, and will ask you if you'd like to continue. Press Y and let it get on with it.

like image 102
David Avatar answered Nov 14 '22 21:11

David