简体   繁体   English

使用 Javascript 将动画 WebP 转换为 GIF?

[英]Convert animated WebP to GIF with Javascript?

So, I have already forked a working Chrome extension with support to save static WebP to JPG/PNG.所以,我已经分叉了一个可用的 Chrome 扩展,支持将静态 WebP 保存为 JPG/PNG。 But now I'm looking to implement support to save animated WebP to GIF in the extension.但现在我希望在扩展中实现将动画 WebP 保存为 GIF 的支持。

Haven't found anything ATM when searching for a solution for it.在寻找解决方案时没有找到任何 ATM。 Only to save JPG and other format to WebP!只保存JPG等格式到WebP!

I was also looking for a webp2gif solution recently, and it resolved smoothly.最近也在找webp2gif的解决方案,顺利解决了。 You can first understand WebAssembly, which is a technology that can run C, C ++ or other languages ​​in the browser.你可以先了解一下WebAssembly,它是一种可以在浏览器中运行C、C++或其他语言的技术。

So I found the imagemagick image processing library, and then I found the compiled wasm file on github.于是找到了imagemagick图像处理库,然后在github上找到了编译好的wasm文件。 I have tested that it can smoothly convert webp animations to gifs.我已经测试过它可以顺利地将 webp 动画转换为 gif。 Although the conversion speed is a bit slow, he can work normally.虽然转换速度有点慢,但他可以正常工作。 In the end, I integrated it into my project and it worked well.最后,我将它集成到我的项目中,并且运行良好。

imagemagick WASM , Support jpg, png gif, webp files https://github.com/mk33mk333/wasm-im imagemagick WASM , 支持 jpg, png gif, webp 文件https://github.com/mk33mk333/wasm-im

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM