Imported from libpng-1.2.21beta1.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-09-14 10:24:18 -05:00
parent 22eaa89c5a
commit 219d3b449f
54 changed files with 183 additions and 140 deletions

View File

@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* Last changed in libpng 1.2.19 August 19, 2007
* Last changed in libpng 1.2.21 [September 14, 2007]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -549,7 +549,7 @@ png_set_expand(png_structp png_ptr)
if(png_ptr == NULL) return;
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
#ifdef PNG_WARN_UNINITIALIZED_ROW
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
#endif
}
@@ -579,6 +579,7 @@ png_set_palette_to_rgb(png_structp png_ptr)
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
#ifdef PNG_WARN_UNINITIALIZED_ROW
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
#endif
}
@@ -591,7 +592,7 @@ png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
if(png_ptr == NULL) return;
png_ptr->transformations |= PNG_EXPAND;
#ifdef PNG_WARN_UNINITIALIZED_ROW
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
#endif
}
#endif
@@ -616,7 +617,7 @@ png_set_tRNS_to_alpha(png_structp png_ptr)
png_debug(1, "in png_set_tRNS_to_alpha\n");
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
#ifdef PNG_WARN_UNINITIALIZED_ROW
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
#endif
}
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
@@ -628,7 +629,7 @@ png_set_gray_to_rgb(png_structp png_ptr)
png_debug(1, "in png_set_gray_to_rgb\n");
png_ptr->transformations |= PNG_GRAY_TO_RGB;
#ifdef PNG_WARN_UNINITIALIZED_ROW
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
#endif
}
#endif
@@ -3867,9 +3868,9 @@ png_do_expand(png_row_infop row_info, png_bytep row,
}
else if (row_info->bit_depth == 16)
{
png_byte red_high = (trans_value->red > 8) & 0xff;
png_byte green_high = (trans_value->green > 8) & 0xff;
png_byte blue_high = (trans_value->blue > 8) & 0xff;
png_byte red_high = (trans_value->red >> 8) & 0xff;
png_byte green_high = (trans_value->green >> 8) & 0xff;
png_byte blue_high = (trans_value->blue >> 8) & 0xff;
png_byte red_low = trans_value->red & 0xff;
png_byte green_low = trans_value->green & 0xff;
png_byte blue_low = trans_value->blue & 0xff;