[libpng16] Relocated misplaced #endif in png.c sRGB profile checking.
diff --git a/ANNOUNCE b/ANNOUNCE
index cee5a47..913ab0f 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 @@
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 2b47048..aeb84b8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5638,13 +5638,14 @@
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 08e87ad..4d09380 100644
--- a/png.c
+++ b/png.c
@@ -775,14 +775,14 @@
#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 @@
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 @@
/* 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_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