imgo icon indicating copy to clipboard operation
imgo copied to clipboard

有没有可能支持 gif 文档?

Open nana35807731-163-com opened this issue 3 years ago • 1 comments

  1. 感谢制作这么方便的图片处理组件,用起来很流畅舒服!

  2. 有没有可能增加对 gif 图形文档的支持?

  • 重现代码

// tempFile = "test.gif", width = 300, height = 300, gconv 是别的框架的,请忽略
err = imgo.Load(tempFile).Thumbnail(gconv.Int(width), gconv.Int(height)).Save(tempFile).Error

// result
// exception recovered: G:/go/pkg/mod/github.com/fishtailstudio/[email protected]/loader.go:132 Error: source image not support
  • 不需要保存所有的动画帧,能做 thumb 或者保存一个静态的 jpg,就已经足够应付大部分的应用场景了
  • 看到源代码中似乎曾经考虑支持 gif,后来被屏蔽了,也许遇到了一些取舍权衡。如果可能的话请告知 省得其他人跟着去踩坑了
  1. 如果没时间制作的话,可以接受 pull requests 么?很乐意成为这个项目的 contributor

nana35807731-163-com avatar Oct 03 '22 05:10 nana35807731-163-com

对 gif 的支持我暂时还没有想好该怎么实现,实现哪些功能,最近时间也比较少。如果你感兴趣,欢迎提交 PR,谢谢。

fishtailstudio avatar Oct 08 '22 15:10 fishtailstudio