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

2006.03.26 23:48 "Re: [Tiff] 3.8.1 and JPEG problem", by Mikhail Kruk

The snapshot I have doesn't read or write JPEG TIFFs (output is all black)... I'm testing using tiffcp, is it possible that the problem is with it, not the lib? Reading JPG works fine with my own program I build against 3.8.0. Do you want me to try linking my app with the CVS snapshot?

I also tried tiffcp from 3.8.0 and it doesn't work.

I guess the next logical step is to assume that tiffcp is broken and test with my app, but I want to make sure that I'm looking at the right CVS since you sound like you've made some changes and I don't see them.

I've not tested tiffcp, but the results you were getting make perfect sense with the bugs I've corrected in several other files, so I would assume there's nothing wrong with tiffcp as such. It may *seem* that way though... There are several ways to access JPEG compression in TIFF, and only the recommendable way, without use of the pseudotag JPEGCOLORMODE, was broken (as far as I know). So, one app may have been suffering, while another may have been behaving perfectly OK.

When I update CVS, I see what I have comitted. Frank was waiting for the bugfixes, so I assume he too, will soon update CVS and check out my fixes. Since I know very little about CVS systems beyond there basic use, all I can suggest at this stage is

- check the changelog file in the root level. The top few entries should read the following:

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * contrib/addtiffo/tif_ovrcache.c: bugfix to correctly pass size
 of last truncated strip data to TIFFWriteEncodedStrip

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 * libtiff/{tif_jpeg.c, tif_strip.c}: bugfix of tif_jpeg decode raw

2006-03-25  Joris Van Damme  <joris.at.lebbeke@skynet.be>

 prepare the path for new tif_ojpeg.c

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).

I then tried encoding a regular (packbits) TIFF into JPEG (tiffcp -c jpeg test.tiff jpg.tiff) and the result shows up as black in the viewer (the same viewer shows my original YCBCR-encoded file normally, so it knows how to do JPEG; the viewer is Microsoft OFfice Document Imaging, it's pretty good, I've managed to confuse it only once with a 100x20 file which had DPI of 100 specified in it, but I digress). I then used tiffcp to convert that black image back to unencoded and got a good result.