Bitmap
|
public static Bitmap ConvertTo( this Image originalImage, ImageFormat newFormat, bool disposeOriginal )
using System; using System.Drawing; using System.Drawing.Imaging; using GSF.Drawing; class Program { static void Main(string[] args) { // Load original, convert it, and dispose original. using (Bitmap converted = ((Bitmap)Bitmap.FromFile("Original.jpg")).ConvertTo(ImageFormat.Gif)) { // Save the converted image to file. converted.Save("OriginalGif.gif"); } Console.ReadLine(); } }