调整GIF动画大小的Python问题

2024-09-29 21:33:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我想调整动画GIF与保存动画。我尝试使用PIL和PythonMagickWand(ImageMagick)和一些GIF得到坏帧。当我使用PIL时,它会在read frame中损坏frame。为了测试,我使用以下代码:

from PIL import Image  
im = Image.open('d:/box_opens_closes.gif')
im.seek(im.tell()+1)
im.seek(im.tell()+1)
im.seek(im.tell()+1)
im.show()

当我使用MagickWand时:

^{pr2}$

我的GIF在哪里我得到坏框这:test gif

在GIF编辑器软件中,所有帧都可以。问题出在哪里?谢谢。在


Tags: 代码fromimagereadpilseek动画gif

热门问题