GBX.NET.Imaging.SkiaSharp
1.1.0-beta1
Prefix Reserved
See the version list below for details.
dotnet add package GBX.NET.Imaging.SkiaSharp --version 1.1.0-beta1
NuGet\Install-Package GBX.NET.Imaging.SkiaSharp -Version 1.1.0-beta1
<PackageReference Include="GBX.NET.Imaging.SkiaSharp" Version="1.1.0-beta1" />
paket add GBX.NET.Imaging.SkiaSharp --version 1.1.0-beta1
#r "nuget: GBX.NET.Imaging.SkiaSharp, 1.1.0-beta1"
// Install GBX.NET.Imaging.SkiaSharp as a Cake Addin #addin nuget:?package=GBX.NET.Imaging.SkiaSharp&version=1.1.0-beta1&prerelease // Install GBX.NET.Imaging.SkiaSharp as a Cake Tool #tool nuget:?package=GBX.NET.Imaging.SkiaSharp&version=1.1.0-beta1&prerelease
GBX.NET.Imaging.SkiaSharp
Provides extensions for image handling in GBX.NET using SkiaSharp.
Framework support
- .NET 8
- .NET 6
- .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.SkiaSharp; // You need to add this
var map = Gbx.ParseHeaderNode<CGameCtnChallenge>("Path/To/My.Map.Gbx");
map.ExportThumbnail("MyThumbnail.jpg", SkiaSharp.SKEncodedImageFormat.Jpeg, quality: 95);
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.SkiaSharp; // 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 format
and quality
parameters to tweak the exported format.
License
GBX.NET.Imaging.SkiaSharp library is MIT Licensed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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. 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 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. |
.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. |
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.1.0 | 309 | 7/23/2024 |
1.1.0-beta2 | 125 | 7/16/2024 |
1.1.0-beta1 | 84 | 7/16/2024 |
1.0.1 | 106 | 5/31/2024 |
1.0.1-beta1 | 92 | 5/30/2024 |
1.0.0 | 118 | 5/4/2024 |