2019.11.11 16:20 "[Tiff] OJpeg files in 4.1.0 no longer display in my viewer", by Laube, Warren

2019.11.12 12:55 "Re: [Tiff] OJpeg files in 4.1.0 no longer display in my viewer", by Laube, Warren

This fixes the regression between 4.0.10 and 4.1.0. All files that previously opened in 4.0.10 are still opening correctly with this update.

The next question my supervisor is going to ask, when would I expect to see a release with this change. I know its only been a week for 4.1.0 but we have lots of hoops to jump through to use non-official released code.

Thanks

Warren

-----Original Message-----
From: Even Rouault <even.rouault@spatialys.com>
Sent: Monday, November 11, 2019 5:17 PM
To: tiff@lists.osgeo.org

Cc: Laube, Warren (DI SW LCS APPS C&D) <warren.laube@siemens.com>

Subject: Re: [Tiff] OJpeg files in 4.1.0 no longer display in my viewer

Warren,

I've a proposed fix in https://gitlab.com/libtiff/libtiff/merge_requests/97 that still passes on my zackthecat file, on your two images and reject the corrupted image that was rejected by the previously wrong test. I feel much better about the checks I added than the previous contributed checks that I couldn't really make sense of.

I'd appreciate if you and other people having OJPEG files could confirm that the above fix works.

Even

Please file a ticket on https://gitlab.com/libtiff/libtiff/ and attach

> (or provide a link) to such a file.

Must be related to some formulations of OJPEG. At least

> https://github.com/OSGeo/gdal/blob/master/autotest/gcore/data/zackthec

at.tif can still be processed. This is actually the only OJPEG file

> I've accessed to. Some others like yours, made available under a free

> license, could be helpful.

Even

1On lundi 11 novembre 2019 16:20:35 CET Laube, Warren wrote:

I've just upgraded to libTiff 4.1.0 from 4.0.10 and have noticed a

problem opening Tiff files with OJpeg compression. Files displaying

> > correctly in

4.0.10 no longer work in 4.1.0 and I have traced the issue to new

code added in 4.1.0 in tif_ojpeg.c around line 866 shown below. I

> > now get this "Inconsistent number of MCU in codestream" error message and no image.

Commenting out this error check code allows my images to be

> > displayed again.

if (jpeg_bytes != expected_bytes)
       {
              TIFFErrorExt(tif->tif_clientdata,module,"Inconsistent

> > number

of MCU in codestream");
              sp->error_in_raw_data_decoding = 1;
              return(0);
       }

Are others seeing this issue and can this code be fixed to allow my

> > images to work again?

--
Spatialys - Geospatial professional services
http://www.spatialys.com