mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix exporting in GIF format in the legacy IM portability layer
This commit is contained in:
parent
88ff4ae126
commit
d149634ad4
@ -141,7 +141,7 @@ class Image(object):
|
||||
if fmt.lower() == 'gif':
|
||||
data = image_to_data(self.img, 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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user