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

2019.11.11 17:38 "Re: [Tiff] OJpeg files in 4.1.0 no longer display in my viewer", by Bob Friesenhahn

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?

Since you are able to modify the source code, it would be good to include jpeg_bytes and expected_bytes in the error report. The TIFFErrorExt() function supports printf style formatting characters.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/

Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt