2007.04.11 23:10 "[Tiff] O-JPEG problems", by Mick O'Neill

2007.04.24 01:55 "RE: [Tiff] O-JPEG problems", by Mick O'Neill

I have built this new library, and it does work better than the old. However, it still could not render all of the pages in that TestBig file. It looks like it dows, but pages 2-11 come out as plain black backgrounds. The error being reported is "Improper call to JPEG library in state 0. `LibJpeg'.

There were a couple of minor compile problems in tiff_dirinfo.c that were easily fixed. An if statement was placed before the other variable declarations in TIFFFindFieldInfo and TIFFFindFieldInfoByName (legal in C++, but not in C).

I have left the TestBig.tif file in http://midimick.com/temp, and have also included the rendered jpeg files in the same folder. If you have anu ideas, they would be much appreciated. The TIFF file is viewable in the free "Brava" reader, so the image data is there and intact...its just a matter of getting to it.

Thanks for any assistance.

Mick O'Neill

> -----Original Message-----
> From: Joris [mailto:joris.at.lebbeke@skynet.be]
> Sent: Thursday, 12 April 2007 12:13 PM
> To: Mick O'Neill; TIFF mailing list
> Subject: Re: [Tiff] O-JPEG problems

I have encountered a number of TIFF files that have images in the OJPEG format (type 6), but do not contain the JPEGInterchangeFormat Tag. When this problem was first recognised (about 18 months ago), I was able to put the following modification into the OJepgSetupDecode function to allow for it:

You've found one of the problems of the old OJPEG decoder, but unfortunately this problem was far from the only one. There were many other types of OJPEG this decoder didn't like, and on some it actually crashed access violation style, so can't actually safely recommend it which is why it was disabled by default.

> This is why we've replaced it with a totally new one, build
> from scratch, that is far more robust, and supports very
> nearly all OJPEG images out there, including many types
> without JPEGInterchangeFormat tag. We feel more confident
> with this new OJPEG codec, which is why this one is enabled
> by default. We did this new OJPEG after the release of the
> latest stable version, so if you need it you need to get a

hold of a CVS copy. In order to do that, see the instructions on LibTiff homepage (http://www.remotesensing.org/libtiff/). Make sure you check out the stable branch-3-9, not CVS head that is a currently unstable BigTIFF upgrade in progress.

Unfortunately, we cannot actually do any bug hunting and patching of the previous unstable OJPEG decoder. It would be mission impossible given its inadequate design, and waste of time seeing the new one is there to replace it. I did test your TestBig.tif file with the new OJPEG decoder, though, and all 14 IFDs decode fine.