gpt4 book ai didi

python - 如何从 Python 中的 .gif 动画中提取给定帧

转载 作者:太空狗 更新时间:2023-10-30 01:10:27 28 4
gpt4 key购买 nike

我正在尝试弄清楚如何在 Python 中从动画 gif 中提取给定的帧,可能是在 PIL 中。我无法轻易地挖掘它,我猜这需要一些 gif 格式的知识,这对我来说是不容易理解的。有什么直接的方法可以做到这一点?我需要做一些自定义解析吗?

最佳答案

Reading Sequences

The GIF loader supports the seek and tell methods. You can seek to the next frame (im.seek(im.tell()+1), or rewind the file by seeking to the first frame. Random access is not supported.

http://effbot.org/imagingbook/format-gif.htm
http://effbot.org/imagingbook/image.htm

关于python - 如何从 Python 中的 .gif 动画中提取给定帧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3482193/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com