Convert image file formats in C# and VB.NET

With GemBox.Imaging, you can convert image file formats using C# or VB.NET applications. This component supports conversion to and from the following image formats:

  • JPEG
  • PNG
  • TIFF
  • GIF

The following example shows how you can easily load a JPG image and convert it to a PNG file.

Image file which is saved using GemBox.Imaging
Screenshot of an image file converted from JPG to PNG in C#
Upload your file (Drag file here)
using System;
using GemBox.Imaging;

class Program
{
    static void Main()
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        using (var image = Image.Load("%InputFileName%"))
        {
            // Saving image to selected image file format
            image.Save("Converting.%OutputFileType%");
        }
    }
}
Imports System
Imports GemBox.Imaging

Module Program

	Sub Main()

		' If using Professional version, put your serial key below.
		ComponentInfo.SetLicense("FREE-LIMITED-KEY")
		
		Using image As Image = Image.Load("%InputFileName%")
			' Saving image to selected image file format
			image.Save("Converting.%OutputFileType%")
		End Using
	End Sub
End Module

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