小编use*_*974的帖子

如何用Linux显示动画gif?

我想在Linux中从python控制台打开一个GIF图像.通常在打开.png或时.jpg,我会做以下事情:

>>> from PIL import Image                                                                                
>>> img = Image.open('test.png')
>>> img.show()
Run Code Online (Sandbox Code Playgroud)

但如果我这样做:

>>> from PIL import Image                                                                                
>>> img = Image.open('animation.gif')
>>> img.show()
Run Code Online (Sandbox Code Playgroud)

Imagemagick将打开,但只显示gif的第一帧,而不是动画.

有没有办法在Linux中的查看器中显示GIF的动画?

python linux gif animated-gif python-imaging-library

8
推荐指数
1
解决办法
5885
查看次数