New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Add precise frame control to py5_tool.animated_gif
#350
Comments
I started working on this and basically have it working. I also should add this feature to https://py5coding.org/reference/py5tools_capture_frames.html The function signatures of both will change a bit as a result. |
@villares , here's what the new functions look like: http://dev.py5coding.org/reference/py5tools_capture_frames.html This is a breaking change because some of the parameters are now keyword only. |
Great! Check out this example, please: https://github.com/py5coding/py5examples/blob/main/notebooks/Simple%20py5%20Examples.ipynb I'm going to hunt my sketch-a-day sketches that use |
After this release, that example won't work. The first parameter is fine but the last three will need to be keyword arguments: py5_tools.animated_gif('images/test.gif', count=10, period=1, duration=1) You should be able to use the keywords now and then you don't have to worry about stuff breaking when the release happens. |
Yeah, this is what I was thinking, "retrofitting" my previous sketches with keyword arguments. |
Good choice! Nobody likes regex at first. The only way to learn to like regex is to use it frequently enough that you get good at it. I try to seek out opportunities to use regex so I can continue build my ability to use regex. |
The
py5_tool.animated_gif
feature is great, but I miss from the gifAnimation library that I used with Processing Java/Python mode the "fine control" of choosing to add frames in some circumstances...When making small loops the "time control" afforded by
animated_gif
doesn't seem helpful. I then usually export all frames (or every odd frame) and generate the animation elsewhere. Am I missing somethig?A lazy idea... could we have
animated_gif_from_frames(filename, list_of_frames, duration)
?Originally posted by @villares in #349
The text was updated successfully, but these errors were encountered: