From b92c89d10574b08440d4bc70084cfe816155225b Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Fri, 18 Oct 2024 01:43:42 +0800 Subject: [PATCH] Update create_GIF_with_python.py --- 2019.12.03_create_GIF_with_python/create_GIF_with_python.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/2019.12.03_create_GIF_with_python/create_GIF_with_python.py b/2019.12.03_create_GIF_with_python/create_GIF_with_python.py index 8eee0ef..ac8b48a 100644 --- a/2019.12.03_create_GIF_with_python/create_GIF_with_python.py +++ b/2019.12.03_create_GIF_with_python/create_GIF_with_python.py @@ -5,4 +5,8 @@ for i in range(1000): image = str(i)+'.jpg' im = imageio.imread(image) images.append(im) -imageio.mimsave("a.gif", images, 'GIF', duration=0.1) # durantion是延迟时间 \ No newline at end of file +imageio.mimsave("a.gif", images, fps=5, duration=1, loop=0) + +# fps: 帧率,表示每秒显示的帧数。 +# duration: 设置每一帧的持续时间(单位:秒),这里设置为 1。 +# loop: 设置动图的循环次数,0 表示无限循环。 \ No newline at end of file