mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 17:54:32 +03:00
Fix #2782
This commit is contained in:
parent
6d2a02c6b1
commit
1cf2deba3b
|
@ -731,7 +731,9 @@ def _save(im, fp, filename, chunk=putchunk):
|
||||||
name = b"ICC Profile"
|
name = b"ICC Profile"
|
||||||
data = name + b"\0\0" + zlib.compress(icc)
|
data = name + b"\0\0" + zlib.compress(icc)
|
||||||
chunk(fp, b"iCCP", data)
|
chunk(fp, b"iCCP", data)
|
||||||
else:
|
|
||||||
|
# You must either have sRGB or iCCP.
|
||||||
|
# Disallow sRGB chunks when a iCCP-chunk has been emitted.
|
||||||
chunks.remove(b"sRGB")
|
chunks.remove(b"sRGB")
|
||||||
|
|
||||||
info = im.encoderinfo.get("pnginfo")
|
info = im.encoderinfo.get("pnginfo")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user