mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Improved ICC profile handling including cHRM chunk generation and
fixed Cygwin+MSVC build errors. The ICC profile handling now includes more checking. Several errors that caused rejection of the profile are now handled with a warning in such a way that the invalid profiles will be read by default in release (but not pre-RC) builds but will not be written by default. The easy part of handling a cHRM chunk is written, where the ICC profile contains the required data. The more difficult part plus guessing a gAMA value requires code to pass selected RGB values through the profile.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
53f7051b1b
commit
b98681b49a
@@ -1495,8 +1495,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
*/
|
||||
ok = png_icc_set_gAMA_and_cHRM(png_ptr,
|
||||
&png_ptr->colorspace, keyword, profile,
|
||||
png_ptr->zstream.adler,
|
||||
0/*prefer explicit gAMA/cHRM*/);
|
||||
png_ptr->zstream.adler);
|
||||
|
||||
/* Steal the profile for info_ptr. */
|
||||
if (ok && info_ptr != NULL)
|
||||
|
||||
Reference in New Issue
Block a user