1999.08.11 22:01 "TIFF to JPEG file - how?", by James McMullen

1999.08.13 04:55 "Re: TIFF to JPEG file - how?", by Brent Foster

If you did such a thing then you wouldn't have produced a lossless copy; jpeg_write_raw_data() only avoids colorspace conversion & resampling, not DCT.

For single-strip images you really don't have to do anything except extract the raw contents of the strip and write it out to a file. I think you can persuade libtiff to give you back the physical contents of a strip without passing it through any decompressor, but I forget how.

Multi-strip images would be considerably harder. If they're all compressed at the same quality setting then in theory you could do it (you'd need a souped-up version of jpegtran); but the spec allows for varying compression settings between strips/tiles, which cannot be losslessly converted to a single 10918-1 JPEG datastream...

How do you do the opposite - put a JPEG into a TIFF without decompress/compress?

How do you extract the physical properties of the JPEG required for the TIFF, and what are they?

Thanks,

Brent Foster