I am using ImageIO: https://imageio.readthedocs.io/en/latest/userapi.html , and I want to know how to set delay between frames in a gif.
Here are the relevant parts of my code.
import imageio
. . .
imageio.mimsave(args.output + '.gif', ARR_ARR)
where ARR_ARR
is an array of numpy uint8
2d array of couplets.
To be clear, I have no problem writing the gif. I cannot, however, find any clarification on being able to write the amount of delay between frames.
So, for example, I have frames 0 ... 9
They always play at the same rate. I would like to be able to control the number of milliseconds or whatever unit between frames being played.
Found it using imageio.help("GIF")
you would pass in something like
imageio.mimsave(args.output + '.gif', ARR_ARR, fps=$FRAMESPERSECOND)
And that seems to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With