Search code examples
ajaxanimationcanvasgifloader

How to simply convert animated GIF to canvas?


I have a problem with webkit browsers - they do not display previews of generated animations on Preloaders.net. I heard about canvas library, searched through the web, but did not quite understand if I can simply convert animated GIF to canvas, so that it's displayed properly. Does anyone know how I can get the downloaded animated GIF image and make canvas display it with no parameters lost (animation speed, transparency etc)?

Thanks in advance


Solution

  • I don't think there is a simple way to do this. you need to get every image of your GIF and then paint it to a canvas. I recommend those 2 links 

    http://blog.somepixels.net/2010/01/gif2tileset-extract-gif-frames-into-a-tile-set/ (code is on github)

    http://www.brighthub.com/internet/web-development/articles/40515.aspx

    Good luck