From f2e2833f28fa11bac699f43ec1443b41ee859a3e Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 28 Dec 2010 21:48:43 -0600 Subject: [PATCH] [devel] 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). --- ANNOUNCE | 11 +++++++---- CHANGES | 5 ++++- pngrtran.c | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 8d6b33f1d..f92477d70 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.0rc04 - December 28, 2010 +Libpng 1.5.0rc04 - 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. @@ -226,7 +226,7 @@ version 1.5.0beta24 [May 7, 2010] offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf. Added more blank lines for readability. -version 1.5.0beta25 [December 28, 2010] +version 1.5.0beta25 [December 29, 2010] In pngpread.c: png_push_have_row() add check for new_row > height Removed the now-redundant check for out-of-bounds new_row from example.c @@ -478,7 +478,7 @@ Version 1.5.0beta58 [December 19, 2010] Fixed the clean rule in Makefile.am to remove pngtest-log.txt Made minor changes to work around warnings in gcc 3.4 -Version 1.5.0rc01 [December 28, 2010] +Version 1.5.0rc01 [December 29, 2010] No changes. Version 1.5.0rc02 [December 27, 2010] @@ -487,7 +487,10 @@ Version 1.5.0rc02 [December 27, 2010] Version 1.5.0rc03 [December 28, 2010] Eliminated scripts/*.def and revised Makefile.am accordingly -Version 1.5.0rc04 [December 28, 2010] +Version 1.5.0rc04 [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 png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 61d25675a..2a5934c5f 100644 --- a/CHANGES +++ b/CHANGES @@ -3125,7 +3125,10 @@ Version 1.5.0rc02 [December 27, 2010] Version 1.5.0rc03 [December 28, 2010] Eliminated scripts/*.def and revised Makefile.am accordingly -Version 1.5.0rc04 [December 28, 2010] +Version 1.5.0rc04 [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 png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngrtran.c b/pngrtran.c index b3425d301..1e22c1079 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1068,7 +1068,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) */ @@ -1202,7 +1202,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 */