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

Timing #6

Open
zaun opened this issue Aug 10, 2019 · 1 comment
Open

Timing #6

zaun opened this issue Aug 10, 2019 · 1 comment

Comments

@zaun
Copy link

zaun commented Aug 10, 2019

When playing this animation back, using gif->gce.delay as the replay between frames, it doesn't work properly. Most frames only last for 1 render.

eyeroll

@lecram
Copy link
Owner

lecram commented Sep 19, 2020

That's because most frames in this GIF have gif->gce.delay == 0, which strictly speaking means no delay, i.e., "don't wait before moving to the next frame". So, as far as I can tell, gifdec is behaving just as specified.
To work around this kind of GIF, we can enforce a minimum value for gif->gce.delay after each call to gd_get_frame(), e.g.:

gd_get_frame(gif);
if (gif->gce.delay < 6)
    gif->gce.delay = 6;

If GIFs like this turn out to be common, I may add such code to example.c.

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