Load, edit, and save image files on Linux or macOS in C#
GemBox.Imaging is a standalone .NET library with cross-platform support. This means developers can use it on non-Windows platforms like Linux and macOS.
The following example shows how to load and edit image files using GemBox.Imaging on Linux (Ubuntu).
Prerequisites
Install Visual Studio Code.
Install the C# for Visual Studio Code extension.
Install .NET Core SDK on Ubuntu.
After installing the requirements listed above you can follow these steps using Visual Studio Code (VS Code) to create a simple Console project and a C# code that generates DOCX and PDF files.
1. Open a project folder
Open VS Code.
Click Open Folder on the EXPLORER panel.
Select the folder you want your console project to be in, in our case the GemBoxExample folder.

2. Create a new console project
Open the Integrated Terminal in VS Code by clicking View>Terminal or using the CTRL + ` shortcut.
In the terminal window, execute the following command:
dotnet new consoleThis command will create a code file (Program.cs) and a project file (GemBoxExample.csproj) inside the opened folder.

3. Edit project files
- Add a reference to GemBox.Imaging in the GemBoxExample.csproj file:
<ItemGroup>
<PackageReference Include="GemBox.Imaging" Version="*" />
</ItemGroup>- Edit the C# code in Program.cs file:
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("FragonardReader.jpg"))
{
image.Resize(64, 64);
image.Save("Resized.png");
}
}
}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("FragonardReader.jpg")
image.Resize(64, 64)
image.Save("Resized.png")
End Using
End Sub
End Module4. Run the console project
In the terminal window, execute the following command:
dotnet runThis command will run your Console application and load, edit, save image files that you can open in any image application.

