Skip to content

Commit

Permalink
Passing duration as milliseconds instead of seconds in write_gif_with…
Browse files Browse the repository at this point in the history
…_image_io. Fixes #2151.
  • Loading branch information
TimSchneider42 committed Apr 23, 2024
1 parent bc8d1a8 commit ac35d0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion moviepy/video/io/gif_writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ def write_gif_with_image_io(
quantizer = 0 if opt != 0 else "nq"

writer = imageio.save(
filename, duration=1.0 / fps, quantizer=quantizer, palettesize=colors, loop=loop
filename,
duration=1000.0 / fps,
quantizer=quantizer,
palettesize=colors,
loop=loop,
)
logger(message="MoviePy - Building file %s with imageio." % filename)

Expand Down

0 comments on commit ac35d0e

Please sign in to comment.