I noticed in the code src/icns_jp2.c that it does not support saving JP2 data with OpenJPEG:
#ifdef ICNS_OPENJPEG
// OpenJPEG is broken for RGB+A images for now. See a possible patch here:
// http://groups.google.com/group/openjpeg/browse_thread/thread/1cb7807b2053592e
// error = icns_opj_image_to_jp2(image, dataSizeOut, dataPtrOut);
icns_print_err("icns_image_to_jp2: Saving JP2 data with OpenJPEG is not yet supported!\n");
error = ICNS_STATUS_UNSUPPORTED;
#else
Since Debian is removing Jasper it would be good to investigate the status of this and fix the issue if possible.
https://lists.debian.org/msgid-search/20160228223104.GA11405@pisco.westfalen.local
Diff:
Diff:
It looks like the issue may have been fixed in OpenJPEG trunk...
Likely here:
https://github.com/uclouvain/openjpeg/issues/333
... or possibly here:
https://github.com/uclouvain/openjpeg/issues/426
Worth testing, but in any case, Mac OS X does not write icns files using JPEG2000 since 10.8 (current version is 10.10). If removing jasper is desired, it may be sufficient to use current libicns OpenJPEG support with no changes.
Those issues don't appear to be merged/fixed yet.
I'd like to make a new release and Debian upload soon, if you could work on some of the open bug reports that would be great otherwise I'll just ship what we have in SVN I think.
This has been fixed in git using a patch from Carlos Maddela, but only for OpenJPEG version 2.0.