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.

Upload your file (Drag file here)
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
Image file which is saved using GemBox.Imaging
Screenshot of an image file converted from JPG to PNG using GemBox.Imaging

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.

See also


Next steps

GemBox.Imaging is a .NET component that provides an easy way to load, edit, save images. GemBox.Imaging also supports file format conversions and image transformations (resize, crop, rotate and flip).

Download Buy