tiff patch - simon

SVN revision: 19561
This commit is contained in:
Carsten Haitzler 2006-01-06 15:39:46 +00:00
parent c26ccebd9d
commit 22c2bc2b86
1 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ raster(TIFFRGBAImage_Extra * img, uint32 * rast,
uint32 *pixel, pixel_value;
int i, j, dy, rast_offset;
DATA32 *buffer_pixel, *buffer = img->image->data;
int alpha_premult = (EXTRASAMPLE_UNASSALPHA==img->rgba.alpha);
image_width = img->image->w;
image_height = img->image->h;
@ -104,7 +105,7 @@ raster(TIFFRGBAImage_Extra * img, uint32 * rast,
g = TIFFGetG(pixel_value);
b = TIFFGetB(pixel_value);
pixel_value = (*(pixel++));
if ((a > 0) && (a < 255))
if ((a > 0) && (a < 255) && (alpha_premult))
{
r = (r * 255) / a;
g = (g * 255) / a;