mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 22:03:12 +02:00
Fix exporting in GIF format in the legacy IM portability layer
This commit is contained in:
parent
88ff4ae126
commit
d149634ad4
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ def export(self, fmt='JPEG'):
|
|||
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…
Reference in a new issue