Trouble using JP2

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?".
Post Reply
JDlugosz

Trouble using JP2

Post by JDlugosz »

I want to archive some "original" scan files with minimum loss but some compression, so I'm converting the 48-bit color TIFF files to JPEG-2000.

First, the documentation is wrong: the default produces much larger files than the -quality 85 option. I don't know if it is defaulting to lossless or virtually lossless, but it doesn't compress much either.

Second, it does not copy the ICC/ICM profile from the original, but marks it as sRGB incorrectly.
Profiles:
Profile-icc: 3024 bytes
IEC 61966-2.1 Default RGB colour space - sRGB
the data is not transformed; the values are still as in the original file (Adobe RGB).

If I then use morgrify -profile to attach AdobeRGB.icc (as extracted from the original file using convert), it turns a 8 meg file into a 35 meg file! Clearly it also re-encoded it at a higher bit rate, which is a stupid thing to do by default because it was already "lost". Furthermore, it didn't include the profile! Identify -verbose shows it still has the wrong sRGB profile.

What's going on here? How do I use this correctly for JP2 files? I'm also interested in other options for color sampling etc. but I want to get the basics to work first.

--John
JDlugosz

Re: Trouble using JP2

Post by JDlugosz »

bump.

Can someone help me with JPEG-2000?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Trouble using JP2

Post by magick »

Keep in mind, ImageMagick is open-source. If it is deficient, you can add a patch for an enhancement or fix a bug. Be sure to post the patch here so others can benefit from your work.

In the mean-time, take a look at the JPEG-2000 encoding options discussed here: http://www.imagemagick.org/script/jp2.php.
JDlugosz

Re: Trouble using JP2

Post by JDlugosz »

magick wrote:Keep in mind, ImageMagick is open-source. If it is deficient, you can add a patch for an enhancement or fix a bug. Be sure to post the patch here so others can benefit from your work.

In the mean-time, take a look at the JPEG-2000 encoding options discussed here: http://www.imagemagick.org/script/jp2.php.
Thanks for the link.

If that includes documentation, I'll edit to match reality or add cross-references. Does that require some formal patch mechanism or can I just post the edited HTML files somewhere?

--John
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Trouble using JP2

Post by magick »

Your can download the HTML and post a diff patch or just post a URL to the entire modified HTML file, whatever is more convenient.
Post Reply