How to convert image from one format to another
Following namespaces should be added.
using System.Drawing;
using System.Drawing.Imaging;
Sample Code:
string image_path = “C\\images\\baby1.jpg”;
Image img;
img = Image.FromFile(image_path);
img.Save(image_path , ImageFormat.Gif);
The above code will save the image from Jpeg to Gif format. Other formats supported includes Bmp,Icon,Exif,Emf,MemoryBmp,Jpeg,Png,Tiff,Wmf.
