mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-14 01:04:45 +03:00
Set the length of ICC_PROFILE to 1
This is because the number of "values" returned is 1 (currently a tuple with only 1 value). I have a more extensive explanation in the issue #1462, and fixes that.
This commit is contained in:
parent
ac6e1ef949
commit
128752e629
|
@ -555,6 +555,10 @@ class ImageFileDirectory_v2(collections.MutableMapping):
|
|||
if legacy_api and self.tagtype[tag] in [5, 10]:
|
||||
values = values,
|
||||
dest[tag], = values
|
||||
elif tag == ICCPROFILE and self.tagtype[tag] == 7:
|
||||
dest[tag], = values
|
||||
elif tag == ICCPROFILE and self.tagtype[tag] == 1:
|
||||
dest[tag] = bytes(values)
|
||||
else:
|
||||
dest[tag] = values
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user