After installing Imagemagick, I've tested it with jpg image, like this:
identify 1.jpg
But, I got this result:
identify: no decode delegate for this image format `1.jpg' @ error/constitute.c/ReadImage/550.
Then, I tried to add support for JPEG format by:
yum install libjpeg libjpeg-devel
but, I got:
Setting up Install Process
No package libjpeg available.
No package libjpeg-devel available.
Nothing to do
I thought I need to update the apt-get, I did:
apt-get install libjpeg libjpeg-devel
but, I got:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libjpeg
E: Unable to locate package libjpeg-devel
Is there an easy way to get those libraries installed ? I am using Ubuntu 12.04.
I fixed the problem by installing from source the jpeg encoding library available at http://www.ijg.org/files/jpegsrc.v8c.tar.gz.
Then I re-installed ImageMagick from source:
Now its working, I've tested it like this:
If you decide to build ImageMagick from source, you need to be prepared to manually resolve all dependencies. Unless you have a pressing need, you should install all software on Ubuntu from a repository -- either the official repos or a PPA.
If you install Imagemagick using APT (
apt-get
, Synaptic, Software Center, etc.), then JPG files will work just fine, as I confirmed on my machine.If your reason for building from source is to get a more recent version, hunt for a PPA that tracks the most recent version. If you're building from source in order to help with development, then you should find out from the Imagemagick folks just what is required to succesfully build it from source. It might be that you need to specify some flag to
./configure
or have some development library installed before running./configure
.But normally, building from source just needlessly complicates things.
Oh, by the way, Red Hat and Ubuntu use different names for packages. So if
yum
complains about a missing package, it shouldn't be surprising ifapt-get
can't find a package by that name. You shouldn't mix package managers on a system unless you have a really good reason to do so. Even then, try every other option first.Note that the
no decode delegate
error can (quite confusingly) result from imagemagick (or some part of it) not finding the file. So before running to reinstall imagemagick, check withidentify -list format
andconvert -list configure
whether the JPEG format is supported, and if it is, the problem will probably be somewhere else.For example,
convert -resize 50% foo\ bar.jpg
gave me ano decode delegate for this image format
eror, butconvert -resize 50% 'foo bar.jpg'
worked perfectly.If you have just installed php5-imagick, try also installing the full imagemagick package. This will install all required libraries, such as the jpeg one.
sudo apt-get install imagemagick
Then restart your webserver to reload al libraries:
sudo service apache2 restart
JPEG decoding should now work without error.
have you tried :
sudo apt-get install libjpeg62
if the above command doesn't work, please go through following link.
http://psx-scene.com/forums/f150/help-install-libjpeg-libpng-ubuntu-9-10-livecd-64122/
Let em know, if this was helpful, good luck... :)
| Easiest way | Download "Synaptic Package Manager" from Software center. --> removed older libjpeg packages* --> reinstalled libjpeg8 & libjpeg-turbo8 & libjpeg-turbo8-dev.
PS: I was getting same error. It took me 2 days to get solved. My error when I was trying to display jpg image:
Then, I download "Synaptic Package Manager" from Software center. --> removed older libjpeg packages* --> reinstalled libjpeg8 & libjpeg-turbo8 & libjpeg-turbo8-dev.
(*synaptics package manager will show dependency with other package, remove only older independent libjpeg packages)
After that I am able to open JPEG images without any fear of error.
Hope it helps :)
That error message also appears if you have SPACES in file's names, as imagick and its toolset can't process those correctly on Linux. So before processing the files with imagemagick, mogrify, or identify, or any of the tools that come with imagemagick, do a
to replace all spaces in file names with underscores;
I hope this will help someone
I resolved it by installing ImageMagick rpm using dnf command. See my answer here for reference - ImageMagick PNG delegate install problems