How to extract frames from an animated gif using javascript? [closed]

走远了吗. 提交于 2019-12-10 13:45:50

问题


Does anyone have a simple solution to extract frames from a gif using javascript?

I know some online tools like Ezgif and Gif-explode, but I'm wondering if this is also possible using just javascript?


回答1:


For a client-side solution I'd recommend to have a look at libgif-js. It allows to step to a specific frame in the GIF and you could then use the Canvas API to capture a single frame by drawing the image to the canvas and then getting the Data URL.



来源:https://stackoverflow.com/questions/39309560/how-to-extract-frames-from-an-animated-gif-using-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!