processing/p5.js

GIFs that don't loop break unless reset before play()

Open

#5 228 ouverte le 6 mai 2021

Voir sur GitHub
 (11 commentaires) (0 réactions) (1 assigné)JavaScript (3 178 forks)batch import
Area:ImageBugHelp Wantedp5.js 2.0+

Métriques du dépôt

Stars
 (20 784 stars)
Métriques de merge PR
 (Merge moyen 8j 13h) (45 PRs mergées en 30 j)

Description

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.

Guide contributeur