有人知道如何用C/C++/C#将.GIF格式的图片读取并且显示出来?
来源:百度知道 编辑:UC知道 时间:2024/05/15 23:42:42
c#picture可以直接显示gif
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Imaging;
namespace WindowsApplication1
{
/// <summary>
/// Form8 的摘要说明。
/// </summary>
public class animateImage : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
Bitmap animatedImage = new Bitmap("1.gif");
bool currentlyAnimating = false;
public animateImage()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造