Imported from libpng-1.2.19rc4.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-08-09 21:45:43 -05:00
parent 88713fd590
commit f0a97a0d80
55 changed files with 177 additions and 131 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 9, 2007
* Last changed in libpng 1.2.19 August 10, 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)
@@ -548,6 +548,7 @@ png_set_expand(png_structp png_ptr)
png_debug(1, "in png_set_expand\n");
if(png_ptr == NULL) return;
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
}
/* GRR 19990627: the following three functions currently are identical
@@ -574,6 +575,7 @@ png_set_palette_to_rgb(png_structp png_ptr)
png_debug(1, "in png_set_palette_to_rgb\n");
if(png_ptr == NULL) return;
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
}
#if !defined(PNG_1_0_X)
@@ -584,6 +586,7 @@ png_set_expand_gray_1_2_4_to_8(png_structp png_ptr)
png_debug(1, "in png_set_expand_gray_1_2_4_to_8\n");
if(png_ptr == NULL) return;
png_ptr->transformations |= PNG_EXPAND;
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
}
#endif
@@ -604,8 +607,9 @@ png_set_gray_1_2_4_to_8(png_structp png_ptr)
void PNGAPI
png_set_tRNS_to_alpha(png_structp png_ptr)
{
png_debug(1, "in png_set_expand\n");
png_debug(1, "in png_set_tRNS_to_alpha\n");
png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS);
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
}
#endif /* defined(PNG_READ_EXPAND_SUPPORTED) */
@@ -615,6 +619,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;
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
}
#endif
@@ -1259,7 +1264,8 @@ png_do_read_transformations(png_structp png_ptr)
}
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
/* Application has failed to call either png_read_start_image()
* or png_read_update_info(). This check added to libpng-1.2.19 */
* or png_read_update_info() after setting transforms that expand
* pixels. This check added to libpng-1.2.19 */
png_error(png_ptr, "Uninitialized row");
#if defined(PNG_READ_EXPAND_SUPPORTED)