- 2006.03.18 16:21 "Re: [Tiff] old jpeg support", by Joris Van Damme
-
2006.03.18 17:21 "Re: [Tiff] old jpeg support", by Andrey Kiselev
-
2006.03.20 20:32 "Re: [Tiff] 3.8.1 and JPEG problem", by Mikhail Kruk
- 2006.03.20 18:04 "[Tiff] 3.8.1 and JPEG problem", by Mikhail Kruk
- 2006.03.25 08:07 "Re: [Tiff] 3.8.1 and JPEG problem", by Joris Van Damme
-
2006.03.20 20:32 "Re: [Tiff] 3.8.1 and JPEG problem", 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.
- Are you absolutely sure you're working with current CVS? Did you check the changelog file and found those top entries I specified?
Yes, changelog has 4 entries from March 25 under your name.
- Are you absolutely sure you're refering to JPEG, and not OJPEG?
see below
- I don't have any experience with tiffcp. I don't even have a working build of that contrib.
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.
- But if you double-check and confirm you're working with JPEG compression in current CVS, I guess I'll have to get tiffcp going on my machine and dig into it... Using TIFFTAG_JPEGCOLORMODE in tiffcp is no option as far as I'm concerned, the bug ought to be fixed instead of burried under bad logic.
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.