[libpng16] PNG_sRGB_PROFILE_CHECKING = (-1) now means no sRGB profile checking.

This commit is contained in:
Glenn Randers-Pehrson 2014-04-20 20:06:14 -05:00
parent 72855fb11e
commit 0ace9f589f
3 changed files with 18 additions and 14 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.11beta04 - April 13, 2014 Libpng 1.6.11beta04 - April 21, 2014
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -47,12 +47,13 @@ Version 1.6.11beta03 [April 6, 2014]
Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes Fixed a typo in pngrutil.c, introduced in libpng-1.5.6, that interferes
with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss).
Version 1.6.11beta04 [April 13, 2014] Version 1.6.11beta04 [April 19, 2014]
Made progressive reading of interlaced images consistent with the Made progressive reading of interlaced images consistent with the
behavior of the sequential reader and consistent with the manual. The behavior of the sequential reader and consistent with the manual,
row_callback now receives the proper pass number and unexpanded rows, by moving some code out of the PNG_READ_INTERLACING_SUPPORTED blocks.
when png_combine_row is not used or not built, by moving some code The row_callback now receives the proper pass number and unexpanded rows,
out of the PNG_READ_INTERLACING_SUPPORTED blocks. when png_combine_row is not used or not built,
Allow PNG_sRGB_PROFILE_CHECKING = (-1) to mean no sRGB profile checking.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

11
CHANGES
View File

@ -4898,12 +4898,13 @@ Version 1.6.11beta03 [April 6, 2014]
with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss). with "blocky" expansion of sub-8-bit interlaced PNG files (Eric Huss).
Optionally use __builtin_bswap16() in png_do_swap(). Optionally use __builtin_bswap16() in png_do_swap().
Version 1.6.11beta04 [April 13, 2014] Version 1.6.11beta04 [April 19, 2014]
Made progressive reading of interlaced images consistent with the Made progressive reading of interlaced images consistent with the
behavior of the sequential reader and consistent with the manual. The behavior of the sequential reader and consistent with the manual,
row_callback now receives the proper pass number and unexpanded rows, by moving some code out of the PNG_READ_INTERLACING_SUPPORTED blocks.
when png_combine_row is not used or not built, by moving some code The row_callback now receives the proper pass number and unexpanded rows,
out of the PNG_READ_INTERLACING_SUPPORTED blocks. when png_combine_row is not used or not built,
Allow PNG_sRGB_PROFILE_CHECKING = (-1) to mean no sRGB profile checking.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

8
png.c
View File

@ -773,13 +773,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else #else
# ifdef __STDC__ # ifdef __STDC__
return PNG_STRING_NEWLINE \ return PNG_STRING_NEWLINE \
"libpng version 1.6.11beta04 - April 13, 2014" PNG_STRING_NEWLINE \ "libpng version 1.6.11beta04 - April 21, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE; PNG_STRING_NEWLINE;
# else # else
return "libpng version 1.6.11beta04 - April 13, 2014\ return "libpng version 1.6.11beta04 - April 21, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -2136,7 +2136,7 @@ png_icc_check_tag_table(png_const_structrp png_ptr, png_colorspacerp colorspace,
return 1; /* success, maybe with warnings */ return 1; /* success, maybe with warnings */
} }
#ifdef PNG_sRGB_SUPPORTED #if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0
/* Information about the known ICC sRGB profiles */ /* Information about the known ICC sRGB profiles */
static const struct static const struct
{ {
@ -2321,7 +2321,9 @@ png_icc_set_sRGB(png_const_structrp png_ptr,
/* Is this profile one of the known ICC sRGB profiles? If it is, just set /* Is this profile one of the known ICC sRGB profiles? If it is, just set
* the sRGB information. * the sRGB information.
*/ */
#if PNG_sRGB_PROFILE_CHECKS >= 0
if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler)) if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler))
#endif
(void)png_colorspace_set_sRGB(png_ptr, colorspace, (void)png_colorspace_set_sRGB(png_ptr, colorspace,
(int)/*already checked*/png_get_uint_32(profile+64)); (int)/*already checked*/png_get_uint_32(profile+64));
} }