| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
2005.03.11 15:36 "unassociated v associated alpha", by Chris Losingerjust curious...
in tif_getimage.c, the putRGBUAcontig8bittile function (8-bit packed
samples => RGBA w/ unassociated alpha) appears to be treating the alpha
data as if it's been pre-multiplied:
...
a = pp[3];
r = (pp[0] * a) / 255;
g = (pp[1] * a) / 255;
b = (pp[2] * a) / 255;
*cp++ = PACK4(r,g,b,a);
...
while the putRGBAAcontig8bittile function (8-bit packed samples => RGBA w/
associated alpha) simply copies the pixel data to the output, without doing
any alpha calculations.
are these reversed ? seems to me you'd want to multiply the "associated"
data, but copy the "unassociated" data.
or, am I confused... ? :)
-c
__________________________
Chris Losinger
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|||||||