mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.19.tar
This commit is contained in:
18
pngrtran.c
18
pngrtran.c
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||
*
|
||||
* Last changed in libpng 1.2.19 August 15, 2007
|
||||
* Last changed in libpng 1.2.19 August 18, 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,7 +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);
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
@@ -577,7 +577,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);
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
@@ -590,7 +590,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;
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
@@ -615,7 +615,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);
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
@@ -627,7 +627,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;
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
png_ptr->flags &= !(PNG_FLAG_ROW_INIT);
|
||||
#endif
|
||||
}
|
||||
@@ -1272,12 +1272,16 @@ png_do_read_transformations(png_structp png_ptr)
|
||||
png_error(png_ptr, "NULL row buffer");
|
||||
#endif
|
||||
}
|
||||
#if 0
|
||||
#ifdef PNG_WARN_UNINITIALIZED_ROW
|
||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
||||
/* Application has failed to call either png_read_start_image()
|
||||
* or png_read_update_info() after setting transforms that expand
|
||||
* pixels. This check added to libpng-1.2.19 */
|
||||
#if (PNG_WARN_UNINITIALIZED_ROW==1)
|
||||
png_error(png_ptr, "Uninitialized row");
|
||||
#else
|
||||
png_warning(png_ptr, "Uninitialized row");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_EXPAND_SUPPORTED)
|
||||
|
||||
Reference in New Issue
Block a user