首页  编辑  

BMP2GIF

Tags: /C#/图形图像/   Date Created:

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