Monday, July 18, 2022

[FIXED] How to use gif image inside html5 canvas?

Issue

I've been searching all day to use gif image inside html5 canvas can't find a useful article in it,is there any way I could use gif image inside canvas. I'm in position to use a gif image inside a canvas but it doesn't changes it loads loads the first frame only and how to play the gif image completely or is there any way I could use gif formatted image inside a canvas.


Solution

Quote from jsgif: A GIF player in JavaScript

Unfortunately, the DOM doesn't expose individual frames of a GIF, so this is done by downloading the GIF (with XMLHttpRequest), parsing it, and drawing it on a .

Maybe you would take a look in the jsgif source code to find some ideas



Answered By - alessandro
Answer Checked By - Gilberto Lyons (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.