mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Disallow storing sRGB information when the sRGB is not supported.
Reverted previous attempt to allow gAMA and sRGB non-support with the simplified API.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
7fdb594e73
commit
e4413a735b
9
png.c
9
png.c
@@ -768,13 +768,13 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.2beta02 - April 14, 2013" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.2beta02 - April 18, 2013" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2013 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.2beta02 - April 14, 2013\
|
||||
return "libpng version 1.6.2beta02 - April 18, 2013\
|
||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@@ -2275,7 +2275,10 @@ png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
|
||||
png_icc_check_tag_table(png_ptr, colorspace, name, profile_length,
|
||||
profile))
|
||||
{
|
||||
png_icc_set_sRGB(png_ptr, colorspace, profile, 0);
|
||||
# ifdef PNG_sRGB_SUPPORTED
|
||||
/* If no sRGB support, don't try storing sRGB information */
|
||||
png_icc_set_sRGB(png_ptr, colorspace, profile, 0);
|
||||
# endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user