Page 1 of 1

MacPorts +jpeg2 option broken

Posted: 2014-04-14T10:40:52-07:00
by mowaca
This option doesn't appear to work anymore. I think this is related to the change from jasper to openjp2 - it refers to the --with-jp2 option in the config file which no longer does anything.

I also tried building from source but I can't figure out how to get the jp2 delegate installed --with-openjp2 doesn't appear to do anything unless you have --with-jp2 enabled. Help!

IM 6.8.9.0.

Re: MacPorts +jpeg2 option broken

Posted: 2014-04-14T11:06:04-07:00
by fmw42
You have to install OpenJPEG 2.0. Jasper has been replaced by OpenJPEG 2.0. Recompile IM. But I have had problems myself with the version of OpenJPEG 2 from MacPorts. It seems to use older file naming conventions, so IM cannot find the files. I am not sure if it is fixed in MacPorts, since I have not tried installing it again myself for some weeks. Let me know if you still have trouble after installing OpenJPEG 2.0 from MacPorts and reinstalling IM.

OpenJPEG has moved from libopenjpeg to libopenjp2 and libopenjpeg.pc to libopenjp2.pc.

See what files you have installed from MacPorts.

Re: MacPorts +jpeg2 option broken

Posted: 2014-04-14T12:38:33-07:00
by mowaca
There's no port called libopenjp2,there's one called libopenjpeg, is that what you meant? I think you are suggesting compiling from source, I'll try that.

I want to clarify that the +jpeg2 option no longer working in macports is a bug - either fix it or remove the variant if its no longer supported.

* I actually went back to the ImageMagick-6.8.7-10_0 port, the +jpeg2 variant works there. Thanks!

Re: MacPorts +jpeg2 option broken

Posted: 2014-04-14T13:29:19-07:00
by fmw42
There's no port called libopenjp2,there's one called libopenjpeg, is that what you meant?
Yes, but be sure it is version 2.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-07T02:51:04-07:00
by ryandesign
I am the maintainer of ImageMagick in MacPorts, but I was only informed of this problem today. If nobody reports problems to me, it's quite possible I won't know about the problem and therefore won't be working on fixing it, so please report MacPorts issues in the MacPorts issue tracker when you find them.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-07T14:11:10-07:00
by thorsted
Even compiling from source with OpenJpeg 2.1 installed still is not recognized during configure. Seems a bit premature for ImageMagick to drop JasPer support before ensuring OpenJpeg is configured correctly. Thanks Ryan for working on the MacPorts solution.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-08T03:07:49-07:00
by ryandesign
The MacPorts maintainer of openjpeg has updated it to version 2.1.0, which now supplies the pkg-config file ImageMagick expects to find, so it's detected fine. Unfortunately, it does not compile:

Code: Select all

coders/jp2.c:343:44: error: too few arguments to function call, expected 3, have 2
  opj_stream_set_user_data(jp2_stream,image);
  ~~~~~~~~~~~~~~~~~~~~~~~~                 ^
/opt/local/include/openjpeg-2.1/openjpeg.h:1154:1: note: 'opj_stream_set_user_data' declared here
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
^
/opt/local/include/openjpeg-2.1/openjpeg.h:82:20: note: expanded from macro 'OPJ_API'
#define OPJ_API    __attribute__ ((visibility ("default")))
                   ^
I think we now need ImageMagick developer assistance to resolve this.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-08T05:23:56-07:00
by magick
OpenJP2 broke the API between 2.0.0 and 2.0.1. We can require a min release of 2.0.1 to get around this breakage. Look for a patch in ImageMagick 6.8.9-1 Beta later today.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-25T13:59:15-07:00
by ryandesign
Thanks, 6.8.9-1 builds fine with jpeg2.

Re: MacPorts +jpeg2 option broken

Posted: 2014-05-25T14:29:43-07:00
by fmw42
Thanks from me, also. IM compiles fine from source using delegates (openjpeg 2.1.0 -- jp2) from MacPorts.