bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Drawing a animated image to the canvas draws the first frame




Canvas: 2D
6 years ago
6 years ago


(Reporter: Alexei, Unassigned)


Firefox Tracking Flags

(Not tracked)




6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

Steps to reproduce:

This RGBA GIF demo: http://jnglike.site40.net/rgba/basic.html
Animation does not support. Reason: animated GIF does not support in HTML5 Canvas.

Comment 1

6 years ago
Just for clarity, that is some JS library drawing a GIF image onto a canvas. Standard GIFs aren't RGBA, I think.

What exactly is not working? Please provide a screenshot of it and also a screenshot of how it should work (from other working browser).
It did draw a rainbow colored oval ('O'-letter shaped) with a rainbow colored 'shadow'. What is wrong in it?

Comment 2

6 years ago
Not animated - this is problem.
In chrome or safari does working.

Comment 3

6 years ago
This example with APNG fallback (if browser does not support -webkit-canvas in CSS content).

Comment 4

6 years ago
In general, animation not works in Firefox, Opera, IE. Please - add support Animated GIF for HTML5 Canvas.


6 years ago
Component: General → Canvas: 2D
Product: Firefox → Core
QA Contact: general → canvas.2d
The spec says that drawing an animated image to canvas draws the first frame.  Specifically, see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-drawimage and this text (a few pages down the section):

  When the drawImage() method is passed an animated image as its image argument, the user
  agent must use the poster frame of the animation, or, if there is no poster frame, the
  first frame of the animation.

which is what everyone except WebKit does, as you noticed.
Last Resolved: 6 years ago
Resolution: --- → INVALID
Summary: Animated "RGBA GIF" does not works (static image) → Drawing a animated image to the canvas draws the first frame


6 years ago
Blocks: 712218
You need to log in before you can comment on or make changes to this bug.