Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 81300  / 2 Years ago, tue, october 18, 2022, 6:18:26

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.


More From » imagemagick

 Answers
6

I fixed the problem by installing from source the jpeg encoding library available at http://www.ijg.org/files/jpegsrc.v8c.tar.gz.



cd /usr/local/src
tar xvfz jpeg-8c.tar.gz
cd jpeg-8c
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
make
sudo make install


Then I re-installed ImageMagick from source:



cd /usr/local/src
tar xvfz ImageMagick-6.6.9-5.tar.gz
cd ImageMagick-6.6.9-5
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp
make
sudo make install


Now its working, I've tested it like this:



sam@ubuntu:~/RubymineProjects/project/tmp$ identify 1.jpg
1.jpg JPEG 128x106 128x106+0+0 8-bit sRGB 2.22KB 0.000u 0:00.000

[#34492] Tuesday, October 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
terose questions
;