This commit is contained in:
Kovid Goyal 2016-05-13 00:29:11 +05:30
parent 058a58b179
commit 06f4ed353e

View File

@ -313,7 +313,7 @@ class Canvas(QWidget):
if fmt.lower() == 'gif':
data = image_to_data(self.current_image, fmt='PNG', png_compression_level=0)
from PIL import Image
i = Image.open(data)
i = Image.open(BytesIO(data))
buf = BytesIO()
i.save(buf, 'gif')
return buf.getvalue()