From 2c21a4778dd2c12d1e24bd7a265edc97947209a9 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 2 Jul 2016 21:17:56 -0500 Subject: [PATCH] [libpng16] Relocated misplaced #endif in png.c sRGB profile checking. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- png.c | 10 ++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index cee5a4706..913ab0f60 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.24beta03 - July 2, 2016 +Libpng 1.6.24beta03 - July 3, 2016 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. @@ -67,13 +67,14 @@ Version 1.6.24beta02 [June 23, 2016] structure padding is fixable, but it would be a signficant change (moving structure members around). -Version 1.6.24beta03 [July 2, 2016] +Version 1.6.24beta03 [July 3, 2016] Optimized absolute value calculation in filter selection, similar to code in the PAETH decoder in pngrutil.c. Build with PNG_USE_ABS to use this. Added pngcp to the build together with a pngcp.dfa configuration test. Added high resolution timing to pngcp. Added "Common linking failures" section to INSTALL. + Relocated misplaced #endif in png.c sRGB profile checking. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 2b4704841..aeb84b8c3 100644 --- a/CHANGES +++ b/CHANGES @@ -5638,13 +5638,14 @@ Version 1.6.24beta02 [June 23, 2016] structure padding is fixable, but it would be a signficant change (moving structure members around). -Version 1.6.24beta03 [July 2, 2016] +Version 1.6.24beta03 [July 3, 2016] Optimized absolute value calculation in filter selection, similar to code in the PAETH decoder in pngrutil.c. Build with PNG_USE_ABS to use this. Added pngcp to the build together with a pngcp.dfa configuration test. Added high resolution timing to pngcp. Added "Common linking failures" section to INSTALL. + Relocated misplaced #endif in png.c sRGB profile checking. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index 08e87ad88..4d09380c5 100644 --- a/png.c +++ b/png.c @@ -775,14 +775,14 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.24beta03 - June 23, 2016" PNG_STRING_NEWLINE \ + "libpng version 1.6.24beta03 - July 3, 2016" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \ PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.6.24beta03 - June 23, 2016\ + return "libpng version 1.6.24beta03 - July 3, 2016\ Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -2354,7 +2354,6 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, return 0; /* no match */ } -#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */ void /* PRIVATE */ png_icc_set_sRGB(png_const_structrp png_ptr, @@ -2363,12 +2362,11 @@ png_icc_set_sRGB(png_const_structrp png_ptr, /* Is this profile one of the known ICC sRGB profiles? If it is, just set * the sRGB information. */ -#if PNG_sRGB_PROFILE_CHECKS >= 0 if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler) != 0) -#endif (void)png_colorspace_set_sRGB(png_ptr, colorspace, (int)/*already checked*/png_get_uint_32(profile+64)); } +#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */ #endif /* sRGB */ int /* PRIVATE */ @@ -2385,7 +2383,7 @@ png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace, png_icc_check_tag_table(png_ptr, colorspace, name, profile_length, profile) != 0) { -# ifdef PNG_sRGB_SUPPORTED +# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0 /* If no sRGB support, don't try storing sRGB information */ png_icc_set_sRGB(png_ptr, colorspace, profile, 0); # endif