AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.06.11 21:36 "Class Y (YCbCr) tiffs with 420 subsampling", by Thomas Richter
2010.06.11 23:21 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Bob Friesenhahn
2010.06.12 16:18 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Thomas Richter
2010.06.12 17:01 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Bob Friesenhahn
2010.06.12 17:25 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Thomas Richter
2010.06.14 06:01 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Joris Van Damme
2010.06.14 06:40 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Thomas Richter

2010.06.14 06:40 "Re: Class Y (YCbCr) tiffs with 420 subsampling", by Thomas Richter

Joris Van Damme (AWare Systems) schrieb:
> Thomas,
>
>> I checked into the tiff directory reader (tif_dirread.c), which again
>> calls TIFFScanlineSize(), which again only divides by the subsampling in
>> X direction, but rather ignores the subsampling in Y direction - hence
>> getting an invalid result.
>
> The problem is that the functionality of TIFFScanlineSize has not been 
> definined for subsampled images, not in code nor in documentation. At 
> some time, some parts of the library depended on some type of return 
> in this case, others depended on another type of return, and yet other 
> parts had their own local modified copy of the code. Attempts have 
> been made to sort it out, but no attempt has been consistent over time.
Ok, I see. Thus, I guess we agree that at least the usage of 
TIFFScanlineSize in the directory reader is incorrect as the semantics 
of TIFFScanlineSize isn't well defined
enough to give it any specific meaning in the case of subsampling being 
use. One can then compute the proper/expected plane size by a second 
function that is still
to be implemented.

What about TIFFScanlineSize()? I suppose to simply fail over and return 
with an error in case subsampling is enabled is then a fair option, then 
see what it breaks
and fix that on a case by case basis? Either by giving 
TIFFScanlineSize() a defined sematics, or by splitting it into several 
functions?

So long,
    Thomas