Page 1 of 1

JPEG2000 to PDF without recompression

Posted: 2007-11-08T08:54:26-07:00
by edwardsj
We tried using ImageMagick's "convert" utiltiy from the command line to convert JPEG2000 images to PDF, but it looks like convert is recompressing the souce images. Is there some setting that would turn off recompression and just "wrap" PDF around the original JPEG2000 data?

DETAILS: We have zillions of JPEG2000 scans of historic government land documents, and some of our users want to download them in PDF format. It is my understanding that Adobe Viewer and PDF support JPEG2000 inherently, so we should be able to generate PDFs from our JPEG2000 files without recompressing and sacrificing image quality. When we tried using ImageMagick's convert utility, it generated a PDF that was much larger than the JPEG2000 original file. We tried various settings for image quality and compression, but it really seems like there's no "don't recompress" option.

Re: JPEG2000 to PDF without recompression

Posted: 2007-11-08T09:33:07-07:00
by magick
Did you try
  • convert image.jp2 -compress JPEG2000 image.pdf
ImageMagick will uncompress image.jp2 and then compress it before its written to PDF. It would be simple enough to modify ImageMagick to inject the original image in the PDF stream. It would be even easier to write a simple wrapper program for your JPEG2000 images or use an off-the-shelf PDF library SDK. If you write your own wrapper, make sure it conforms to the PDF/A standard.

Re: JPEG2000 to PDF without recompression

Posted: 2007-11-08T11:28:53-07:00
by edwardsj
Thanks for the information, that's what we wanted to know. We have looked at some PDF SDKs but haven't yet found one that is smart enough to not recompress JPEG2000.

Re: JPEG2000 to PDF without recompression

Posted: 2007-11-08T12:13:40-07:00
by magick
We could code up a wrapper for you if you sent your requirements. There of course would be a modest charge for our time. If interested, send us a private message (PM) to discuss.

Re: JPEG2000 to PDF without recompression

Posted: 2011-08-21T10:39:36-07:00
by dingodog
magick wrote:We could code up a wrapper for you if you sent your requirements. There of course would be a modest charge for our time. If interested, send us a private message (PM) to discuss.
I also I'm interested

Re: JPEG2000 to PDF without recompression

Posted: 2012-03-29T02:55:59-07:00
by josch
I wrote a tool that does what you want with JPEG and JPEG2000 files. It just embeds them into the pdf without any re-encoding. If any other file type is given, it is just flate encoded. It can also output a multipage pdf.

https://github.com/josch/img2pdf