访问量: 116次,访客数: 116人,浏览量: 1次 
首页  编辑  

BMP2GIF

Tags: /C#/图形图像/   Date Created: Tue Jun 10 2008 01:18:35 GMT+0000 (Coordinated Universal Time)

using System . Drawing . Imaging;

ImageCodecInfo [] vImageCodecInfos = ImageCodecInfo . GetImageEncoders();

Bitmap vBitmap = new Bitmap ( @"c:\temp\temp.bmp" );

foreach ( ImageCodecInfo vImageCodecInfo in vImageCodecInfos)

{

    if (vImageCodecInfo . FormatDescription . ToLower() == "gif" )

   {

       vBitmap . Save( @"c:\temp\temp.gif" , vImageCodecInfo, null );

        break ;

   }

}

//BMP,JPEG,GIF,TIFF,PNG