如何使用 ImageWriter 和 ImageIO 在 Java 中编码动画 GIF?
我查遍了所有地方,但似乎找不到任何易于理解的解释。 (我发现其他 Java 用户编写的类和方法可以做到这一点,但我希望自己编写。)
I've looked all over the place, but can't seem to find any easy to understand explanation. (I've found classes and methods written by other Java users that can do this, but I'm hoping to write my own.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 GIFanim 的
createImage()
方法。也许这会给你一个开始。请注意,这是一个非常幼稚的实现,它生成的图像明显大于使用压缩调色板和执行其他优化的库生成的图像。实现这样一个库将是一项艰巨的任务。
Here is the
createImage()
method of GIFanim. Perhaps that will give you a start.Note that this is a very naïve implementation, that produces images that are significantly larger than can be made with a library that compresses the color palette and performs other optimizations. Implementing a library like that would be a significant task.