Use GDI+
using System.Drawing;
using System.Drawing.Imaging;
private bool ChangeToJPG(string file)
{
try
{
if (!file.ToLower().EndsWith(".png"))
throw new NotImplementedException("Not a png file");
if (!System.IO.File.Exists(file))
throw new NotImplementedException("File not found");
Image png = Image.FromFile(file);
png.Save(file.Replace(".png", ".jpg").Replace(".PNG", ".JPG"), ImageFormat.Jpeg);
return true;
}
catch
{
return false;
}
}
Simple ;-)