如何使用 C# 调整动画 gif 图像的大小? [英] How to resize an animated gif image using C#?

查看:37
本文介绍了如何使用 C# 调整动画 gif 图像的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用 C# 创建动画 gif 图像副本的方法?

Is there a method to create a copy of an animated gif image using C#?

我想要的是使用用户提供的高度和宽度参数生成给定 gif 图像的副本.我已经尝试了几个小时来完成此操作,但生成的图像并未保留原始动画.

What I want is to generate a copy of a given gif image using the height and width parameters that the user provides. I have tried for a couple of hours to accomplish this but the resulting image does not preserve the original animations.

推荐答案

您需要遍历动画 GIF 中的帧并调整每个帧的大小.

You need to loop through the frames in the animated GIF and resize each one.

可能还想看看 GifLib.

这篇关于如何使用 C# 调整动画 gif 图像的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆