AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2019

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2019.01.22 15:11 "Possible bug in libTiff 4.0.9?", by <skypemesm@gmail.com>
2019.01.23 14:14 "Re: Possible bug in libTiff 4.0.9?", by Bob Friesenhahn
2019.01.23 14:43 "Re: Possible bug in libTiff 4.0.9?", by Even Rouault

2019.01.22 15:11 "Possible bug in libTiff 4.0.9?", by <skypemesm@gmail.com>

Hello,



I have upgraded to TIFF 4.0.9 from 4.0.0 and I saw the following change in
tif_write.c:

https://gitlab.kitware.com/third-party/tiff/commit/f0dd74c5e33be1f7f98a3b8d37cc71a889db9fe6?view=parallel

which fixes tif_encodestrip() and it returns -1 in case of failure as
documented.



I believe this fix might have uncovered another bug in the library. I came
across a special case while writing a YCbCr image which is JPEG compressed
and contains a partial strip. The last strip could not be encoded
successfully. I found that the failure is occurring in jpeg_write_raw_data
in the JPEG library. It seems that the cinfo structure passed to the JPEG
library from TIFF library contains incorrect dimensions of the strip if it
is partial.

The buffer that is being passed to the library is of the same size as the
whole strip (even in the case of a partial strip). In case of a partial
strip, the rest of the buffer is filled with zeros.



Image details to be written:

'ImageWidth' - 3008

‘ImageLength’ - 1952

'Photometric' - YCbCr

'Compression' - JPEG

'BitsPerSample' - 8

'SamplesPerPixel' - 3

‘SampleFormat', - UInt

'PlanarConfiguration' - Chunky

'RowsPerStrip' - 256

'YCbCrSubSampling' - [2 1]



Can you please confirm if it is a bug?


Thanks,

Upanita


_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff