Imaging Library for C# and VB.NET Applications

The fastest way how you can get started with GemBox.Imaging library is by exploring our collection of C# and VB.NET examples. These are live examples that show the supported features and APIs that can be used to achieve various imaging related tasks with the GemBox.Imaging component.

System Requirements

GemBox.Imaging requires only .NET, it doesn't have any other dependency.
You can use it on:

  • .NET 6.0+ on Windows
  • .NET Standard 2.0+ (for Linux, macOS, Android, iOS, …)
  • .NET Framework 3.5+

Hello World

The first step in using the GemBox.Imaging library is to add a reference to GemBox.Imaging.dll in your C# or VB.NET project. There are three ways how to do that.

a) Add from NuGet:

You can add GemBox.Imaging as a package by using the following command from the NuGet Package Manager Console:

Install-Package GemBox.Imaging

Or you can search and add GemBox.Imaging from the NuGet Package Manager.

Adding GemBox.Imaging library from NuGet

b) Or add from DLL file:

You can download GemBox.Imaging.dll file from this page and add a reference by browsing to it.

Adding GemBox.Imaging library from DLL

c) Or add from Setup:

You can download the GemBox.Imaging Setup from this page. After installing the setup, you can add a reference to GemBox.Imaging.dll from the Global Assembly Cache (GAC).

Adding GemBox.Imaging library from GAC

The second step is to add a directive for the GemBox.Imaging namespace.

For a C# project, use: using GemBox.Imaging;
For a VB.NET project, use: Import GemBox.Imaging

The third step is to set the license key to use GemBox.Imaging in one of its working modes.

To use a Free mode in a C# project, use: ComponentInfo.SetLicense("FREE-LIMITED-KEY");
To use a Free mode in a VB.NET project, use: ComponentInfo.SetLicense("FREE-LIMITED-KEY")

You can read more about GemBox.Imaging's working modes on the Evaluation and Licensing help page.

The last step is to write your application-specific imaging code, like the following example code that shows how to load example image, resize it to thumbnail size and then save Image instance to image file.

Upload your file (Drag file here)
using System;
using GemBox.Imaging;

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

        using (var image = Image.Load("%InputFileName%"))
        {
            // Resizing the image
            image.Resize(64, 64);

            // Saving the resized image
            image.Save("HelloWorld.%OutputFileType%");
        }
    }
}
Imports System
Imports GemBox.Imaging

Module Program

	Sub Main()

		' If using the Professional version, put your serial key below.
		ComponentInfo.SetLicense("FREE-LIMITED-KEY")
		
		Using image As Image = Image.Load("%InputFileName%")
			' Resizing the image
			image.Resize(64, 64)

			' Saving the resized image
			image.Save("HelloWorld.%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