Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate animated GIF with HTML5 canvas [closed]

Are they any library to do so?

AFAIK dataToURL('image/gif') isn't supported by any browser

like image 860
brillout Avatar asked May 07 '12 17:05

brillout


People also ask

What are the benefits to working with HTML5 canvas directly in Animate CC?

A new document type (HTML5 Canvas) has been added to Animate that provides native support for creating rich and interactive HTML5 content. It means that you can use the traditional Animate timeline, workspace, and tools to create content, but produce HTML5 output.

Is HTML5 better than GIF?

GIFs are dull in colour As GIF files are only 8-bit, this means they can only show 256 colours. HTML5, on the other hand, has roughly 16.7 million colours to choose from. Thus, making HTML5 a more vibrant, colourful high-quality online banner ad option.

Can you animate with HTML5?

You can create animations with HTML5 by combining HTML, CSS, and JavaScript (JS), with which you can build shapes. Also, you can control animations and edit images, video, and audio by means of JS or CSS elements, all of which you then add to a drawing board, which you set up with the <canvas> element.


1 Answers

Canvas can't generate (animated) GIFs. You need to use a JavaScript library to do so.

There is jsgif, a JS library to generate animated GIFs: http://github.com/antimatter15/jsgif

This blog post explains the usage: http://antimatter15.com/wp/2010/07/javascript-to-animated-gif/

like image 154
leemes Avatar answered Sep 26 '22 14:09

leemes