Page 1 of 1

Trouble using JP2

Posted: 2008-06-01T22:55:18-07:00
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

Re: Trouble using JP2

Posted: 2008-06-03T15:39:07-07:00
by JDlugosz
bump.

Can someone help me with JPEG-2000?

Re: Trouble using JP2

Posted: 2008-06-03T17:37:01-07:00
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.

Re: Trouble using JP2

Posted: 2008-06-03T20:03:07-07:00
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

Re: Trouble using JP2

Posted: 2008-06-03T20:17:12-07:00
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.