technopagan / adept-jpg-compressor

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

How to configure ImageMagick for adept #19

Open Fleshgrinder opened 10 years ago

Fleshgrinder commented 10 years ago

Hi there!

Currently I compile my ImageMagick executable myself and I use the following configure options:

./configure \
  --disable-static \
  --enable-shared \
  --with-jpeg \
  --with-png \
  --with-quantum-depth=8 \
  --with-rsvg \
  --with-webp \
  --without-bzlib \
  --without-djvu \
  --without-dps \
  --without-fftw \
  --without-fontconfig \
  --without-freetype \
  --without-gvc \
  --without-jbig \
  --without-jp2 \
  --without-lcms \
  --without-lcms2 \
  --without-lqr \
  --without-lzma \
  --without-magick-plus-plus \
  --without-openexr \
  --without-pango \
  --without-perl \
  --without-tiff \
  --without-wmf \
  --without-x \
  --without-xml \
  --without-zlib

Sadly, running the adept unit tests (great thing) fails:

 ✓ Find Tools
 ✓ Find Tools with path resolving
 ✓ Validate Input JPEG
 ✓ Read Image Dimension
 ✓ Optimize Tile Size
 ✓ Optimize Black/White Threshold
 ✓ Slice Image into Tiles
 ✗ Retrieve Black/White Median
   (in test file /usr/local/src/adept-jpg-compressor/unittests/tests_adept.bats, line 56)
 ✓ Calculate Tile Count for Reassembly

9 tests, 1 failure

Which options are really necessary to compile ImageMagick and use it with adept?

technopagan commented 10 years ago

Hi!

Can you run "identify" on the command line with your manually compiled version of ImageMagick?

Adept needs "identify" to be available. Test it with "identify -channel Gray -format "%[fx:255*mean]" unittests/test.jpg" within your Adept checkout and see if it returns "124.519".

Fleshgrinder commented 10 years ago

Hi, yes both works without any problems:

fleshgrinder@host:/usr/local/src/adept-jpg-compressor$ which identify
/usr/local/bin/identify
fleshgrinder@host:/usr/local/src/adept-jpg-compressor$ identify -channel Gray -format "%[fx:255*mean]" unittests/test.jpg
124.519