[master] Fixed bug in background transformation handling in pngrtran.c

(it was looking for the flag in png_ptr->transformations instead of in
png_ptr->flags).
This commit is contained in:
Glenn Randers-Pehrson 2010-12-28 21:45:08 -06:00
parent fb05477e11
commit 9a8c568e3c
3 changed files with 14 additions and 65 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.4.6beta01 - December 27, 2010
Libpng 1.4.6beta01 - December 29, 2010
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -16,74 +16,20 @@ Source files with LF line endings (for Unix/Linux) and with a
Source files with CRLF line endings (for Windows), without the
"configure" script
lp146b01.7z (LZMA-compressed, recommended)
lp146b01.zip
lp146b01.7z
Other information:
1.4.6beta01-README.txt
1.4.6beta01-LICENSE.txt
Changes since the last public release (1.4.4):
Changes since the last public release (1.4.5):
version 1.4.5beta01 [September 25, 2010]
Fixed possible configure.ac bug introduced in version 1.4.4rc05.
Rebuilt configure scripts with autoconf-2.68 instead of autoconf-2.65
version 1.4.5beta02 [October 5, 2010]
Reverted configure scripts to autoconf-2.65
Fixed problem with symbols creation in Makefile.am which was assuming that
all versions of cpp write to standard output by default (Martin Banky). The
bug was introduced in libpng-1.2.9beta5.
version 1.4.5beta03 [October 8, 2010]
Wrapped long lines in CMakeLists.txt and introduced ${libpng_public_hdrs}
Undid Makefile.am revision of 1.4.5beta02.
version 1.4.5beta04 [November 8, 2010]
Check for out-of-range text compression mode in png_set_text().
version 1.4.5rc01 [November 19, 2010]
No changes.
version 1.4.5beta05 [December 27, 2010]
Removed some extraneous parentheses that appeared in pngrutil.c of
libpng-1.4.3beta01
Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin)
Moved reading of file signature into png_read_sig (Cosmin)
Fixed atomicity of chunk header serialization (Cosmin)
Added test for io_state in pngtest.c (Cosmin)
Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts.
version 1.4.5beta06 [November 21, 2010]
Restored the parentheses in pngrutil.c; they are needed when the
png_get_*int_*() functions are compiled (i.e., when PNG_USE_READ_MACROS
is not defined).
Make the "png_get_uint_16" macro return a png_uint_32 in libpng-1.4 for API
compatibility.
Changes to remove gcc warnings (John Bowler)
Certain optional gcc warning flags resulted in warnings in libpng code.
With these changes only -Wconversion and -Wcast-qual cannot be turned on.
Changes are trivial rearrangements of code. -Wconversion is not possible
for pngrutil.c (because of the widespread use of += et al on variables
smaller than (int) or (unsigned int)) and -Wcast-qual is not possible
with pngwio.c and pngwutil.c because the 'write' callback and zlib
compression both fail to declare their input buffers with 'const'.
version 1.4.5beta07 [November 25, 2010]
Reverted png_get_uint_16 macro to beta05 and added comment about the
potential API incompatibility.
version 1.4.5rc02 [December 2, 2010]
No changes.
version 1.4.5rc03 [December 3, 2010]
Added missing vstudio/*/*.vcxproj files to the zip and 7z distributions.
version 1.4.5 [December 9, 2010]
Removed PNG_NO_WRITE_GAMMA from pngminim/encoder/pngusr.h
version 1.4.5beta01 [December 27, 2010]
Version 1.4.6beta01 [December 29, 2010]
Fixed bug in background transformation handling in pngrtran.c (it was
looking for the flag in png_ptr->transformations instead of in
png_ptr->flags).
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2735,7 +2735,10 @@ version 1.4.5rc03 [December 3, 2010]
version 1.4.5 [December 9, 2010]
Removed PNG_NO_WRITE_GAMMA from pngminim/encoder/pngusr.h
version 1.4.5beta01 [December 27, 2010]
version 1.4.6beta01 [December 29, 2010]
Fixed bug in background transformation handling in pngrtran.c (it was
looking for the flag in png_ptr->transformations instead of in
png_ptr->flags).
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
* Last changed in libpng 1.4.5 [December 27, 2010]
* Last changed in libpng 1.4.5 [December 29, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -1008,7 +1008,7 @@ png_init_read_transformations(png_structp png_ptr)
*/
png_ptr->transformations &= ~PNG_BACKGROUND;
png_ptr->transformations &= ~PNG_GAMMA;
png_ptr->transformations |= PNG_STRIP_ALPHA;
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
else
@ -1131,7 +1131,7 @@ png_init_read_transformations(png_structp png_ptr)
/* Handled alpha, still need to strip the channel. */
png_ptr->transformations &= ~PNG_BACKGROUND;
png_ptr->transformations |= PNG_STRIP_ALPHA;
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED */