9

I installed libjpeg62 and imagemagick on my ubuntu 10.04 (lucid).

Running identify command with a gif works but running it with a jpeg produces this error:

identify: no decode delegate for this image format `stream,13307,0.jpg' @ error/constitute.c/ReadImage/532.

Does anyone know how to fix this? Thanks!

mmarschall
  • 93
  • 1
  • 1
  • 7

1 Answers1

19

Well after spending an entire day trying to figure this out I finally got it, Ill post it just in case anyone else is having this similar issue. Here is how it started and the solution; I was running Ubuntu 9.10, Karmic Koala and had the current version of ImageMagick installed and it worked fine, I then had to update my ImageMagick to the latest version by running;

sudo apt-get install imagemagick

that is when i was no longer able to upload jpg via paperclip on my ruby on rails app. The solution is to go get the latest ImageMagick version and build it yourself;

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd ImageMagick-*
./configure --disable-shared
make
sudo make install

Also after you run the command ./configure --disable-shared, look at the last 50 lines and make sure you see;

JPEG v1           --with-jpeg=yes       yes
JPEG-2000         --with-jp2=yes        yes

If it says no then you need to install libjpeg62 and possibly libjpeg62-dev. That worked for me, hope it helps others.

amccormack
  • 135
  • 5
daniel
  • 206
  • 3
  • 3
  • 5
    This is helpful, thanks. In my case, I had `libjpeg62` installed but had to also install `libjpeg62-dev` to get it to work properly (and for JPEG 2000, also `libjasper-runtime` and `libjasper-dev`). – Sophie Alpert Aug 14 '11 at 02:41
  • Thanks for your efforts. Lots of other SO answers got me nowhere. – Sridhar Sarnobat Mar 24 '17 at 05:31