Enabling Reversible Integer Transforms in JPEG 2K Encoder
Posted: 2013-12-31T21:41:04-07:00
Since IM's JPEG 2000 encoder does not have an option to enable reversible color transforms (RCT), its lossless mode isn't truly lossless because there will be errors resulting from the RGB conversion. I went and did some reading online and none of the archiving professions invested in JPEG 2000 recommend ImageMagick for this reason (this article in particular, and this follow-up).
I would like to be able to write .jp2 sequences piped from Avisynth; ImageMagick is the only command-line imaging tool that will allow me to do this, so I'm very interested in getting higher-quality results from your encoder. Have you considered the Open JPEG libraries? Consensus seems to lean in their favor as being the highest-quality JPEG 2K encoder.
Here is an example of a "lossless" .jp2 file overlaying the original image and set to "difference" in Photoshop. I boosted the brightness to make it easier to see, though it's still quite apparent without. Photoshop's own JPEG 2000 encoder created a completely-lossless file.
Here is the command line input I used:
avs2yuv.exe -raw "LRGB_Test.avs" -o - | convert -limit memory 1GiB -limit map 2GiB -depth 16 -size 1920x1080 -set colorspace RGB -colorspace RGB -quality 100 rgb:- "JP2K_Test_%06d.jp2"
I would like to be able to write .jp2 sequences piped from Avisynth; ImageMagick is the only command-line imaging tool that will allow me to do this, so I'm very interested in getting higher-quality results from your encoder. Have you considered the Open JPEG libraries? Consensus seems to lean in their favor as being the highest-quality JPEG 2K encoder.
Here is an example of a "lossless" .jp2 file overlaying the original image and set to "difference" in Photoshop. I boosted the brightness to make it easier to see, though it's still quite apparent without. Photoshop's own JPEG 2000 encoder created a completely-lossless file.
Here is the command line input I used:
avs2yuv.exe -raw "LRGB_Test.avs" -o - | convert -limit memory 1GiB -limit map 2GiB -depth 16 -size 1920x1080 -set colorspace RGB -colorspace RGB -quality 100 rgb:- "JP2K_Test_%06d.jp2"