mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
058a58b179
commit
06f4ed353e
@ -313,7 +313,7 @@ class Canvas(QWidget):
|
|||||||
if fmt.lower() == 'gif':
|
if fmt.lower() == 'gif':
|
||||||
data = image_to_data(self.current_image, fmt='PNG', png_compression_level=0)
|
data = image_to_data(self.current_image, fmt='PNG', png_compression_level=0)
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
i = Image.open(data)
|
i = Image.open(BytesIO(data))
|
||||||
buf = BytesIO()
|
buf = BytesIO()
|
||||||
i.save(buf, 'gif')
|
i.save(buf, 'gif')
|
||||||
return buf.getvalue()
|
return buf.getvalue()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user