diff --git a/ANNOUNCE b/ANNOUNCE index 7a17e1b97..5bcd60bc9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -27,6 +27,8 @@ Other information: Changes since the last public release (1.6.11): Version 1.6.12beta01 [June 6, 2014] + Relocated new code from 1.6.11beta06 in png.c to a point after the + declarations (Max Stepin). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index e1297e648..2233472a1 100644 --- a/CHANGES +++ b/CHANGES @@ -4926,6 +4926,8 @@ Version 1.6.11 [June 5, 2014] No changes. Version 1.6.12beta01 [June 6, 2014] + Relocated new code from 1.6.11beta06 in png.c to a point after the + declarations (Max Stepin). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index aa68e61e7..238933020 100644 --- a/png.c +++ b/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.11 [(PENDING RELEASE)] + * Last changed in libpng 1.6.12 [(PENDING RELEASE)] * Copyright (c) 1998-2014 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.) @@ -2212,11 +2212,6 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, * the profile will fail at that point. */ - /* First see if PNG_SKIP_sRGB_CHECK_PROFILE has been set to "on" */ - if (((png_ptr->options >> PNG_SKIP_sRGB_CHECK_PROFILE) & 3) == - PNG_OPTION_ON) - return 0; - png_uint_32 length = 0; png_uint_32 intent = 0x10000; /* invalid */ #if PNG_sRGB_PROFILE_CHECKS > 1 @@ -2225,6 +2220,11 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, unsigned int i; + /* First see if PNG_SKIP_sRGB_CHECK_PROFILE has been set to "on" */ + if (((png_ptr->options >> PNG_SKIP_sRGB_CHECK_PROFILE) & 3) == + PNG_OPTION_ON) + return 0; + for (i=0; i < (sizeof png_sRGB_checks) / (sizeof png_sRGB_checks[0]); ++i) { if (png_get_uint_32(profile+84) == png_sRGB_checks[i].md5[0] &&