processing/p5.js
Auf GitHub ansehenGIFs that don't loop break unless reset before play()
Open
#5.228 geöffnet am 6. Mai 2021
Area:ImageBugHelp Wantedp5.js 2.0+
Repository-Metriken
- Stars
- (20.784 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 8T 13h) (45 gemergte PRs in 30 T)
Beschreibung
Most appropriate sub-area of p5.js?
- Accessibility (Web Accessibility)
- Build tools and processes
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Friendly error system
- Image
- IO (Input/Output)
- Localization
- Math
- Unit Testing
- Typography
- Utilities
- WebGL
- Other (specify if possible)
Details about the bug:
- p5.js version: 1.0+
- Web browser and version: all
- Operating System: all
- Steps to reproduce this:
Here is an example. Comment out the
gif.setFrame(0)to see the crash and unfriendly error log.
I think it is okay to expect the coder to manually reset to the beginning of a non-looping GIF before playing but when they don't do that it shouldn't crash. A check to make sure that gifProperties.displayIndex never exceeds gifProperties.frames.length - 1 should do the trick!
This could be a nice issue for a newer contributor. I am happy to help.