OpenJP2 delegate on 6.8.9

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
hapiben
Posts: 15
Joined: 2014-07-10T20:10:02-07:00
Authentication code: 6789

Re: OpenJP2 delegate on 6.8.9

Post by hapiben »

We are currently using Jasper and IM works fine with that. However, we need to address the 16bit conversion of jp2 to jpeg which Jasper doesn't handle very well.

I've posted a thread about the issue I have with Jasper. viewtopic.php?f=3&t=25899
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OpenJP2 delegate on 6.8.9

Post by fmw42 »

I do not think IM can fix this. It would seem to be an issue with the Jasper library. I think you may be out of luck, if you cannot use openjpeg 2.1.
hapiben
Posts: 15
Joined: 2014-07-10T20:10:02-07:00
Authentication code: 6789

Re: OpenJP2 delegate on 6.8.9

Post by hapiben »

Hi, I'm trying to install openjpeg 2.0 instead of 2.1 and IM 6.8.8-2.

This is where my openjpeg located

Code: Select all

> sudo find /usr | grep openj
/usr/lib64/libopenjp2.so
/usr/lib64/libopenjp2.so.2.0.0
/usr/lib64/openjpeg-2.0
/usr/lib64/openjpeg-2.0/OpenJPEGConfig.cmake
/usr/lib64/openjpeg-2.0/OpenJPEGTargets.cmake
/usr/lib64/openjpeg-2.0/OpenJPEGTargets-release.cmake
/usr/lib64/libopenjp2.so.6
/usr/share/doc/openjpeg2
/usr/share/doc/openjpeg2/CHANGES
/usr/share/doc/openjpeg2/LICENSE
/usr/share/man/man3/libopenjp2.3.gz
/usr/include/openjpeg-2.0
/usr/include/openjpeg-2.0/openjpeg.h
/usr/include/openjpeg-2.0/opj_config.h
/usr/include/openjpeg-2.0/opj_stdint.h
I can run commands such as opj_dump. Running .configure...

Code: Select all

./configure --prefix=/usr \
--enable-delegate-build --enable-shared --disable-static --disable-opencl \
--with-modules --with-quantum-depth=16 --with-gslib --without-wmf --with-rsvg \
--disable-silent-rules --disable-dependency-tracking --disable-openmp --without-pango \
--with-lqr --with-openjp2
Gives me this delegates with no openjp2

Code: Select all

bzlib djvu mpeg fontconfig freetype gslib jng jpeg lcms openexr png ps rsvg tiff x xml zlib
Do I need to specify flags such as LIBOPENJP2_CFLAGS and LIBOPENJP2_LIBS? If yes, what would be their values?

Code: Select all

-------------------------------------------------------------
checking for LIBOPENJP2... no
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OpenJP2 delegate on 6.8.9

Post by fmw42 »

I am not sure that IM can use Openjpeg 2.0. I believe it needs 2.1.
hapiben
Posts: 15
Joined: 2014-07-10T20:10:02-07:00
Authentication code: 6789

Re: OpenJP2 delegate on 6.8.9

Post by hapiben »

I've managed to install 2.0.1 openJPEG and IM 6.8.9-0. Conversion works now.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OpenJP2 delegate on 6.8.9

Post by fmw42 »

Glad to hear you got it working. Does openJPEG 2.0.1 work with 6.8.9.6?
hapiben
Posts: 15
Joined: 2014-07-10T20:10:02-07:00
Authentication code: 6789

Re: OpenJP2 delegate on 6.8.9

Post by hapiben »

Nope. For some reason, there's an error when I do convert command.

Code: Select all

undefined symbol: opj_stream_destroy_v3
Did some googling about the issue and found no good resources.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: OpenJP2 delegate on 6.8.9

Post by fmw42 »

The changelog shows:

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).

So some final fixes were made at IM 6.8.9.1 to allow the use of OpenJP2 2.1.0

see also viewtopic.php?f=3&t=25416&p=111446&hilit=jp2#p111446
Post Reply