Undo reversible jpeg2000 compression

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
userdude

Undo reversible jpeg2000 compression

Post by userdude »

Hi;

I'm wondering if it's possible to undo the reversible compression in a jpeg2000 file, and convert it to a lossless tiff file? I've tried the following command:

Code: Select all

convert filename.jp2 filename.tif 
... but the above seems to result in a tiff file that shows compression artifacts.

Exifprobe reports that the jp2 file I'm working was reversibly compressed:

@0x0000c99=3225 : Start of JPEG2000 (5/3 reversible compression with explicit quantization) image [8221x5499] length 6831651

The file that I'm trying to convert can be downloaded here:

http://memory.loc.gov/gmd//gmd370m/g370 ... 000054.jp2

I realize there's a chance that the original image used to create the jp2 file had compression artifacts, although I'm hoping that's not the case. Any advice is very much appreciated! Thanks in advance.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Undo reversible jpeg2000 compression

Post by magick »

JPEG-2000 is compressed with a lossless compression algorithm. The pixels are returned exactly as they were saved.
userdude

Re: Undo reversible jpeg2000 compression

Post by userdude »

Thanks for the prompt reply. I guess I was originally misunderstanding things -- but if I'm understanding things correctly now, it sounds like reversible compression is one and the same as lossless compression.

I guess that means that the Library of Congress (at least in this case) compressed the image before saving it again using a lossless compression method. Kind of a silly way of archiving things.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Undo reversible jpeg2000 compression

Post by anthony »

More than likely they scanned the images before jpg2000 was commonly available.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply