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
April 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.04.26 18:39 "Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Edward Lam
2010.04.26 20:12 "Re: Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Edward Lam
2010.04.26 20:59 "Re: Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Olivier Paquet
2010.04.27 13:31 "Re: Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Edward Lam
2010.04.27 13:44 "Re: Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Olivier Paquet

2010.04.26 20:59 "Re: Bug in tif_print.c for TIFFTAG_REFERENCEBLACKWHITE", by Olivier Paquet

On Mon, Apr 26, 2010 at 4:12 PM, Edward Lam <edward@sidefx.com> wrote:
> Edward Lam wrote:
>  > I have an 6-Bit RGBA image and using tiffinfo on it gives:
>
> Er, I meant 8-bit here of course.
>
> I also noticed another problem with the number of expected floats for
> TIFFTAG_REFERENCEBLACKWHITE in the documentation for TIFFSetField:
>      http://libtiff.maptools.org/man/TIFFSetField.3tiff.html
> where it says:
>      2*SamplesPerPixel

That's also what the TIFF spec says in appendix A. Of course, other
mentions of the tag specify 6 float. The spec also says:

    The ordering of pairs is the same as those for pixel components of
    the PhotometricInterpretation type. ReferenceBlackWhite can be applied
    to images with a PhotometricInterpretation value of RGB or YCbCr.
    ReferenceBlackWhite is not used with other PhotometricInterpretation values.

Which implies the tag will only ever have 6 values as both RGB and
YCbCr have 3 components. libtiff always reads/writes 6 floats so it is
definitely wrong to try to display 8 values.

Are there any objections to hardcoding the output of 6 values?

Olivier