Compile ImageMagick with JPEG2000 support
Posted: Fri Dec 11, 2009 11:30 pm
I've discovered a strange oddity (or bug?) in the ImageMagic v6.3.7 available in Ubuntu Hardy with lossless JPEG 2000 conversion: It ain't lossless, because *some* bytes are reduced by the 1 (e.g. 8B => 8A).
I'm currently evaluating if it's a bug and if it's still an issue in v6.5.8-4 (Dec 2009).
In order to compile ImageMagick with JPEG 2000 support, I've had to install the following packages:
Download the ImageMagic source, unpack it and tell the "configure" script to put it in an optional directory, so it won't collide with the already installed, older version - then compile it by running "make":
(JP2 support should be turned on by default, but I've added "--with-jp2" just to be sure)
If JPEG and JPEG-2000 support is properly enabled, the output of ./configure should contain these lines:
Installing it seemed a bit strange, because you can't just install with "checkinstall" as root in one step. I've created the target folder as a regular user and then ran "make install" twice:
Now you should have an independent version of ImageMagick installed in /opt/imagemagick.
I'm currently evaluating if it's a bug and if it's still an issue in v6.5.8-4 (Dec 2009).
In order to compile ImageMagick with JPEG 2000 support, I've had to install the following packages:
Code: Select all
sudo apt-get install libjasper-dev libjpeg62 libperl-dev
Code: Select all
./configure --prefix=/opt/imagemagick --with-jp2
make
If JPEG and JPEG-2000 support is properly enabled, the output of ./configure should contain these lines:
If something went wrong, these formats will be disabled and look like this:JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes yes
Without the libjasper-dev and libjpeg62 package, they're both "no" - regardless if you switch support for them on or not.JPEG v1 --with-jpeg=yes no
JPEG-2000 --with-jp2=yes no
Installing it seemed a bit strange, because you can't just install with "checkinstall" as root in one step. I've created the target folder as a regular user and then ran "make install" twice:
Code: Select all
mkdir /opt/imagemagick
sudo chown myuser:myuser /opt/imagemagick
make install
sudo checkinstall make install