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.23 14:43 "Re: Possible bug in libTiff 4.0.9?", by Even Rouault

On mercredi 23 janvier 2019 08:14:38 CET Bob Friesenhahn wrote:
> On Tue, 22 Jan 2019, SM wrote:
> > 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.
> 
> Does your application provide a full last-strip to libtiff? With JPEG,
> it has always been required that the strip-size be a multiple of 8 or
> 16, depending on the sub-sampling, with a multiple of 16 being a safe
> choice.  The last strip provided to libtiff needs to be a full strip
> just like the other strips.

Bob,

I'm not sure about that. I believe on the contrary that the last strip must 
only contain the remaining number of rows. That's what tiffcp does (see
https://gitlab.com/libtiff/libtiff/blob/master/tools/tiffcp.c#L1005 )

https://www.awaresystems.be/imaging/tiff/specification/TIFF6.pdf also
mentions
at page 19 for RowsPerStrip
"""The number of rows in each strip (except possibly the last strip.)
For example, if ImageLength is 24, and RowsPerStrip is 10, then there are 3
strips, with 10 rows in the first strip, 10 rows in the second strip, and 4 
rows in the third strip. (The data in the last strip is not padded with 6 
extra rows of dummy data.)"""

The JPEG codec has a protection on the writing side to avoid writing too
much 
lines. Was added per
https://gitlab.com/libtiff/libtiff/commit/
54bf10fcbcb22c397f42cb1693df8ac6abbb3ac8


(This is the contrary of a tiled TIFF, where the right most and bottom most 
tile must be full tiles)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff