Convert image file formats
The following example shows how to convert a JPG image to a PNG image using the GemBox.Imaging .NET library in C# and VB.NET.
using GemBox.Imaging;
class Program
{
static void Main()
{
// If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
// Load the input image and save it to a selected image file format.
using (var image = Image.Load("%InputFileName%"))
image.Save("Converting.%OutputFileType%");
}
}
Imports GemBox.Imaging
Module Program
Sub Main()
' If using the Professional version, put your serial key below.
ComponentInfo.SetLicense("FREE-LIMITED-KEY")
' Load the input image and save it to a selected image file format.
Using image As Image = Image.Load("%InputFileName%")
image.Save("Converting.%OutputFileType%")
End Using
End Sub
End Module
The library currently supports the following image formats: JPEG, PNG, GIF, and TIFF. If you need support for other image formats, please create a request on our feedback page or contact support.