Skip to content
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

Configurable delay between frames in animated GIF #151

Open
Jaca313 opened this issue Mar 14, 2024 · 2 comments
Open

Configurable delay between frames in animated GIF #151

Jaca313 opened this issue Mar 14, 2024 · 2 comments

Comments

@Jaca313
Copy link

Jaca313 commented Mar 14, 2024

I'm still learning and i hope it is a simple issue.
I would like to output my animation to a .gif file, but the delay seems to be coded to '20' in Java2dAnimationWriter and the gif is too fast.

Is it possible to change the delay in gif write while using approximately this syntax?
animation.take(10).write[Gif]("example.gif", frame)

If i would like to change it am I supposed to use setDelay with addFrame(BufferedImage) and GifEncoder directly instead?

Thanks for help

@noelwelsh
Copy link
Contributor

Supporting a different delay does seem like a useful feature. I'll have to think about how that can be best exposed in the API.

The existing code was copied from, I think, Processing and I have always found it a bit unreliable but have not had time to look into it in detaill.

@noelwelsh noelwelsh changed the title Question: Is it possible to change gif delay? Configurable delay between frames in animated GIF Mar 14, 2024
@noelwelsh
Copy link
Contributor

I think the path forward to create a new Frame type that allows specifying parameters for the GIF encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants