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
March 2005

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

2005.03.10 10:46 "libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage", by Daniel Sievers
2005.03.10 16:46 "Re: libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage", by Joris Van Damme
2005.03.11 09:17 "Re: libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage", by Daniel Sievers
2005.03.15 13:44 "Re: libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage", by Andrey Kiselev

2005.03.10 10:46 "libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage", by Daniel Sievers

Hi,

I have two related libtiff concerns:

1) Reading TIFF images with the nice TIFFReadRGBAImage() routine

(version of libtiff used is 3.7.1 )

in line 250 of tif_getimage.c it says:
"if (extrasamples > 1)"

That way img->alpha is always left set to 0 for images with
extrasamples==1 (which I assume is the common case). Then alpha values
from the image are not used, but initialized to 0xff.

Shouldn't it say "if (extrasamples > 0)"?

~From what I can see with common code samples and RGB images, these have
a value of extrasamples==1, if they contain an alpha channel.


2) About using the get and set routines for the EXTRASAMPLES flag

The official TIFF homepage lists
http://www.awaresystems.be/imaging/tiff/faq.html as a reference for TIFF
tags. On that page EXTRASAMPLES is defined differently from how it is used.
There it says for the baseline EXTRASAMPLES tag, that this tag consists
of N values, where N=samplesPerPixel-colorSamples.
How it is really used is that it returns N+1 values. The first value
returns the number of extrasamples, while the remaining values work as
documented.
Or do tags with more than one value generally work this way?
Is there any clear documentation on this somewhere?


I would appreciate comments on this, especially the first matter.
Thanks!

- -Daniel