from PIL import Image
Image.open('Pillow/Tests/images/hopper.iccprofile.tif').save('test.png')
In Python 3.5, this results in
Traceback (most recent call last):
Line 2, in <module>
Image.open('Pillow/Tests/images/hopper.iccprofile.tif').save('test.png')
File "PIL/Image.py", line 1675, in save
save_handler(self, fp, filename)
File "PIL/PngImagePlugin.py", line 757, in _save
data = name + b"\0\0" + zlib.compress(im.info["icc_profile"])
TypeError: a bytes-like object is required, not 'tuple'
In Python 3.3 and 3.4, it's TypeError: 'tuple' does not support the buffer interface. In Python 2.7, it's TypeError: must be string or read-only buffer, not tuple
im.info["icc_profile"] is a tuple of length 1, where the first argument is a bytes-like object.
In Python 3.5, this results in
In Python 3.3 and 3.4, it's
TypeError: 'tuple' does not support the buffer interface. In Python 2.7, it'sTypeError: must be string or read-only buffer, not tupleim.info["icc_profile"]is a tuple of length 1, where the first argument is a bytes-like object.