GBX.NET.Imaging 2.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package GBX.NET.Imaging --version 2.0.0                
NuGet\Install-Package GBX.NET.Imaging -Version 2.0.0                
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" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GBX.NET.Imaging --version 2.0.0                
#r "nuget: GBX.NET.Imaging, 2.0.0"                
#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.
// Install GBX.NET.Imaging as a Cake Addin
#addin nuget:?package=GBX.NET.Imaging&version=2.0.0

// Install GBX.NET.Imaging as a Cake Tool
#tool nuget:?package=GBX.NET.Imaging&version=2.0.0                

GBX.NET.Imaging

NuGet Discord

Provides extensions for image handling in GBX.NET (GDI+, Windows only).

Exporting WEBP icons with correct rotation (TM2020 April 2022 update) is not supported, use GBX.NET.Imaging.SkiaSharp or GBX.NET.Imaging.ImageSharp instead for this purpose.

Framework support

  • .NET 8 (Windows)
  • .NET 6 (Windows)
  • .NET Standard 2.0

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; // You need to add this

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

map.ExportThumbnail("MyThumbnail.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

Quality could be degraded as the thumbnail. Use the format parameter to tweak the quality.

Export icon from any CGameCtnCollector (before TM2020 April 2022)

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

using GBX.NET;
using GBX.NET.Engines.GameData; // Note it's GameData now instead of Game
using GBX.NET.Imaging; // 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 pure color bytes and exported to PNG as default. Use the format parameter to tweak the exported format.

License

GBX.NET.Imaging library is MIT Licensed.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net8.0-windows7.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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
2.0.1 161 5/4/2024
2.0.0 107 4/26/2024
2.0.0-rc1 104 4/23/2024
2.0.0-beta1 103 4/20/2024
2.0.0-alpha1 98 4/12/2024
1.1.3 259 11/24/2023
1.1.2 390 6/7/2023
1.1.1 450 8/11/2022
1.1.0 455 7/16/2022
1.0.3 470 2/23/2022
1.0.2 289 12/3/2021
1.0.1 1,742 11/27/2021
1.0.0 328 6/1/2021