technopagan / adept-jpg-compressor

A Bash script to automate adaptive JPEG compression using common CLI tools
Other
377 stars 29 forks source link

No Decode Delegate #33

Closed ryanrussell closed 9 years ago

ryanrussell commented 9 years ago

After installing the dependencies, I am getting the following on any jpg:

identify: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/501.

ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ /usr/bin/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

ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ which jpegrescan /bin/jpegrescan ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ which SaliencyDetector /bin/SaliencyDetector ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ which jpegoptim /usr/bin/jpegoptim ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ uname -a Linux ubuntu-desktop 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ ls -l | grep "test.jpg" -rw-rw-r-- 1 ubuntu ubuntu 59564 Dec 13 19:51 test.jpg ubuntu@ubuntu-desktop:~/work/adept-jpg-compressor$ bash adept.sh test.jpg identify: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/501.

Thanks in advance for any help. My apologies if this is something simple that I've overlooked.

ryanrussell commented 9 years ago

This worked for me: http://askubuntu.com/questions/211627/how-to-add-support-for-the-jpeg-image-format

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

technopagan commented 9 years ago

Thanks Ryan! This is very helpful for documentation!