mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Fixed some bugs in ICC profile writing. The code should now accept
all potentially valid ICC profiles and reject obviously invalid ones. It now uses png_error() to do so rather than casually writing a PNG without the necessary color data.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
363ae65e2b
commit
cf49919686
@@ -73,7 +73,7 @@ png_write_info_before_PLTE(png_structrp png_ptr, png_inforp info_ptr)
|
||||
#ifdef PNG_WRITE_iCCP_SUPPORTED
|
||||
if (info_ptr->valid & PNG_INFO_iCCP)
|
||||
png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
|
||||
(png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
|
||||
info_ptr->iccp_profile, info_ptr->iccp_proflen);
|
||||
#endif
|
||||
#ifdef PNG_WRITE_sBIT_SUPPORTED
|
||||
if (info_ptr->valid & PNG_INFO_sBIT)
|
||||
|
||||
Reference in New Issue
Block a user