2006.03.18 15:59 "[Tiff] old jpeg support", by Mikhail Kruk

2006.03.27 03:56 "Re: [Tiff] 3.8.1 and JPEG problem", by Mikhail Kruk

All right, I got the CVS problem partly figured out. I don't understand why diff wasn't showing any differences, but a new checkout gave me all your changes.

I tested again using tiffcp. The only TIFF file which is JPEG-compressed I have is in YCBCR color space. tiffcp didn't process it correctly, I believe there is a bug in it, but when I brute forced it to do

TIFFSetField(in, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); it worked (tiffcp -none jpg.tiff out.tiff produced an unencoded image which looks correctly).

Don't have time to compe up with correct tiffcp patch right now).

That sure sounds like there is still trouble in tif_jpeg.c...

Meanwhile, Frank checked current CVS, and found that at least addtiffo operates correctly. This addtiffo doesn't use TIFFTAG_JPEGCOLORMODE. My own tests without TIFFTAG_JPEGCOLORMODE also indicate all is fine now.

Yes, changelog has 4 entries from March 25 under your name.

see below

It's under tools, not contrib. It's a utlitiy to copy TIFF files from one format to another (compression, compresion options) and to concatinate and split TIFFs.

No, I think it's the right solution for my decoding problem. I probably didn't explain myslef clearly enough. I was decoding a JPG images with the specific non-rgb color mode (YCbCr). tiffcp apparently reads the YCbCr data from the JPEG and then writes it into uncompressed file without a conversion, i.e. treating it as RGB. The result is messed up as it should be. Tiffcp should be changed to detect that source and destination file are in different color spaces and make the necessary steps to convert between color spaces.

The only remaining problem is encoding JPG. tiffcp is never creating old JPG files and I'm not building with old jpeg support, so I'm positive I'm dealing with the new JPG format. The command is tiffcp -c jpeg:r moon.tif jpg.tif moon.tif is at http://www.scorch2000.com/~meshko/moon.tif jpg.tif is at http://www.scorch2000.com/~meshko/jpg.tif

Again, the wierd thing is that running tiffcp -c none jpg.tif out.tif produces correct file, so somehow the image is correctly stored in jpg.tif, it's just not viewable in the TIFF viewer which does support JPG-encoded TIFFs.