[devel] Add comment about TODO: issue warning if user tries to premultiply
in a nonliner colorspace.
This commit is contained in:
parent
b2154ccb2b
commit
4cfdb3c095
18
pngread.c
18
pngread.c
@ -425,6 +425,24 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
||||
else
|
||||
png_warning(png_ptr,
|
||||
"Ignoring extra png_read_update_info() call; row buffer not reallocated");
|
||||
|
||||
#ifdef PNG_READ_PREMULTIPLY_ALPHA_SUPPORTED
|
||||
if (png_ptr->transformations & PNG_PREMULTIPLY_ALPHA)
|
||||
{
|
||||
/* TO DO:
|
||||
* Check for linear colorspace and if not, issue a warning.
|
||||
* If gAMA is present with gamma == 1.0, it's linear.
|
||||
* If iCCP is present, assume user knows what they are doing
|
||||
* and it's linear.
|
||||
* If gAMA is present with gamma != 1.0, it's not linear.
|
||||
* If no gAMA or iCCP, assume not linear.
|
||||
* If not linear do:
|
||||
* png_warning(png_ptr,
|
||||
* "Premultiply should only be used with gamma == 1.0");
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
png_read_transform_info(png_ptr, info_ptr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user