You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using PngInfo.add((b"cICP", bytes([9, 16, 0, 1])) to set the color space of a PNG to Rec. 2100.
What did you expect to happen?
The cICP chunk was added to the resulting PNG file.
What actually happened?
The cICP chunk was ignored as it is not in the list of allowed chunk names. This old gist shows a workaround which uses a temporary name to masquarade the chunk as a private chunk and then replaces putchunk to change the name back after the check:
What did you do?
Using
PngInfo.add((b"cICP", bytes([9, 16, 0, 1]))
to set the color space of a PNG to Rec. 2100.What did you expect to happen?
The cICP chunk was added to the resulting PNG file.
What actually happened?
The cICP chunk was ignored as it is not in the list of allowed chunk names. This old gist shows a workaround which uses a temporary name to masquarade the chunk as a private chunk and then replaces putchunk to change the name back after the check:
https://gist.github.com/zhuowei/96b6e184bcf2de64433fbb86e15f7762
This chunk type is still only in a draft standard:
https://www.w3.org/TR/png-3/#cICP-chunk
But support is already implemented in a lot of applications:
https://w3c.github.io/png/Implementation_Report_3e/ (See section 2)
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: