Imported from libpng-1.2.8beta2.tar

This commit is contained in:
Glenn Randers-Pehrson
2004-11-01 22:38:54 -06:00
parent 16e11660fe
commit 94d9362fc5
56 changed files with 102 additions and 95 deletions

View File

@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* libpng 1.2.8beta1 - November 1, 2004
* libpng 1.2.8beta2 - November 2, 2004
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -394,7 +394,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags,
png_uint_32 i;
if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
(row_info->color_type == PNG_COLOR_TYPE_RGBA &&
(row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
(transformations & PNG_STRIP_ALPHA))) &&
row_info->channels == 4)
{
@@ -474,7 +474,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags,
}
row_info->channels = 3;
}
else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY &&
else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||
(row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
(transformations & PNG_STRIP_ALPHA))) &&
row_info->channels == 2)
@@ -530,6 +530,8 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags,
}
row_info->channels = 1;
}
if (transformations & PNG_STRIP_ALPHA)
row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
}
}
#endif