Page 1 of 1

Batch conversion utitiles do not recognize JP2

Posted: 2018-07-09T12:22:58-07:00
by ineuw

Code: Select all

Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
Using Linux Mint 18.3 64bit, I have about 900 JP2 images which need to be converted to .jpg. For 'mogrify' and 'convert' utilities, I installed three related libraries in the following order; openjpeg-2, libopenjp2-tools, and libopenjp2-7-dev, + purged and reinstalled imagemagick ,in case it missed linking these libraries. But it doesn't work, and generates the following message;

Code: Select all

mogrify -path jpg -format jpg -quality 95 *.jp2
mogrify-im6.q16: no decode delegate for this image format `JP2' @ error/constitute.c/ReadImage/504.
What am I doing wrong?

Re: Batch conversion utitiles do not recognize JP2

Posted: 2018-07-09T13:08:13-07:00
by fmw42
JP2 requires the OpenJPEG library v 2.1 or higher. It needs to be installed first then Imagemagick. It should then show up on the convert -version listing as jp2.

From the changelog:

2014-04-22 6.8.9-1 Cristy <quetzlzacatenango@image...>
Require OpenJP2 version 2.1.0 (opj_stream_set_user_data() method signature change between 2.0.0 and 2.1.0).

See http://www.openjpeg.org


When you compile Imagemagick, check the config.log file to see why it is not accepting your openjpeg library.

6.9.7-4 (1/14/2017 patch?) is rather old now. You might consider upgrading to the current release at 6.9.10-5.