GBX.NET.Imaging.ImageSharp 1.0.5

Prefix Reserved
dotnet add package GBX.NET.Imaging.ImageSharp --version 1.0.5
                    
NuGet\Install-Package GBX.NET.Imaging.ImageSharp -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GBX.NET.Imaging.ImageSharp" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GBX.NET.Imaging.ImageSharp" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="GBX.NET.Imaging.ImageSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GBX.NET.Imaging.ImageSharp --version 1.0.5
                    
#r "nuget: GBX.NET.Imaging.ImageSharp, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GBX.NET.Imaging.ImageSharp@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GBX.NET.Imaging.ImageSharp&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=GBX.NET.Imaging.ImageSharp&version=1.0.5
                    
Install as a Cake Tool

GBX.NET.Imaging.ImageSharp

NuGet Discord

Provides extensions for image handling in GBX.NET using ImageSharp.

Async methods are available.

Framework support

  • .NET 11
  • .NET 10
  • .NET 9
  • .NET 8

Usage

Export thumbnail from map

You can use CGameCtnChallenge.Thumbnail to get the pure JPEG bytes, but the thumbnail is going to be upside down. This is a long-standing bug in Nadeo games. ExportThumbnail method flips this thumbnail correctly.

using GBX.NET;
using GBX.NET.Engines.Game;
using GBX.NET.Imaging.ImageSharp; // You need to add this

var map = Gbx.ParseHeaderNode<CGameCtnChallenge>("Path/To/My.Map.Gbx");

map.ExportThumbnail("MyThumbnail.jpg", new JpegEncoder { Quality = quality });

Export icon from any CGameCtnCollector

This includes any Item.Gbx, Block.Gbx, Macroblock.Gbx, EDClassic.Gbx, Collection.Gbx, and many more...

For TM2020 after April 2022 update, the WEBP icon is also rotated correctly.

using GBX.NET;
using GBX.NET.Engines.GameData; // Note it's GameData now instead of Game
using GBX.NET.Imaging.ImageSharp; // You need to add this

var node = Gbx.ParseHeaderNode("Path/To/My.Item.Gbx");

if (node is CGameCtnCollector collector)
{
    collector.ExportIcon("MyIcon.png");
}

Quality should not be degraded as the icon is processed with either pure color bytes or lossless WEBP and exported to PNG as default. Use the encoder parameter to tweak the export.

License

GBX.NET.Imaging.ImageSharp is MIT licensed.

ImageSharp 4 requires a Six Labors license when building this project. Place your supplied sixlabors.lic file in this project directory. The file is ignored by Git. You can also set the SixLaborsLicenseFile MSBuild property to the path of a license file stored elsewhere, or set SixLaborsLicenseKey to the full license string. Keep the license file and key out of commits and build logs.

If you need a license, apply for a Community license key if the project qualifies, or use Six Labors pricing for a commercial license. Use this project's public repository URL in an open source application.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 44 11/21/2026
1.0.4 144 10/28/2026
1.0.3 290 1/6/2026
1.0.2 441 5/11/2025
1.0.1 224 12/31/2024
1.0.0 226 7/23/2024
1.0.0-beta2 216 7/16/2024
1.0.0-beta1 237 7/16/2024

- Updated to .NET 11