-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Some animated GIFS either delay or stop running #9254
Comments
I don't have time to set this up and test it but just for background But quickly looking I'm not 100% sure the code will work exactly or you may get 0 at times. Based on the fact you could re-save the GIF and that version works maybe a type of GIF the library does not handle and poor error handling in |
Thanks! This info will be helpful when I get a chance to take another look. |
CircuitPython version
Code/REPL
Behavior
I have run across some animated gifs that either have a noticeable pause at the end of the animation before restarting or just run a single time when displayed by CircuitPython. In both cases the gifs play normally on my desktop computer.
I haven't been able to construct an animated gif that behaves this way and in fact, if I load the gifs in question into GIMP and re-export them they no longer have the issue on CircuitPython, which is obviously a simple workaround.
Here is an example:
Description
I originally thought the issue was that there were extra frames at the end of the animation that were flagged as unused/inactive and CircuitPython wasn't properly discarding so I looked at OnDiskGif.c to see if I could trigger the restart of the animation, before figuring that out I did try simply restarting the animation on a failed frame display and that seemed to fix the broken gifs. The change I made is:
Additional information
Now that I've discovered that the gifs can be easily repaired I'm not really concerned about this issue but I figured someone that understood more about the OnDiskGif code might see an obvious error in the logic that was accounting for the issue. If not, this issue can certainly be closed as the workaround is an easy fix.
The text was updated successfully, but these errors were encountered: