KevInc.CrnLib 0.1.3

dotnet add package KevInc.CrnLib --version 0.1.3
                    
NuGet\Install-Package KevInc.CrnLib -Version 0.1.3
                    
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="KevInc.CrnLib" Version="0.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KevInc.CrnLib" Version="0.1.3" />
                    
Directory.Packages.props
<PackageReference Include="KevInc.CrnLib" />
                    
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 KevInc.CrnLib --version 0.1.3
                    
#r "nuget: KevInc.CrnLib, 0.1.3"
                    
#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 KevInc.CrnLib@0.1.3
                    
#: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=KevInc.CrnLib&version=0.1.3
                    
Install as a Cake Addin
#tool nuget:?package=KevInc.CrnLib&version=0.1.3
                    
Install as a Cake Tool

KevInc.Texture

KevInc.Texture provides .NET libraries for reading, writing, swizzling, and adapting game texture data. The package family is dependency-conscious: low-level wrapper and platform packages stay free of ImageSharp, while ImageSharp integration lives in opt-in packages.

Packages

Package Purpose Heavy dependencies
KevInc.Texture Shared raw texture model and format identifiers. None
KevInc.Texture.Ckd CKD/TEX wrapper detection, payload seeking, and wrapper writing. None
KevInc.Texture.Nintendo Nintendo Switch block-linear swizzle and deswizzle helpers. None
KevInc.Texture.Nintendo.ImageSharp ImageSharp codecs, ImageSharp format registration, and stream helpers for Wii SSD, Wii U GTX, and Switch XTX textures. ImageSharp, BCnEncoder
KevInc.Texture.Xbox Xbox 360 texture headers, payload sizing, endian handling, and tiling. None
KevInc.Texture.Xbox.ImageSharp ImageSharp encode/decode helpers and ImageSharp format registration for Xbox 360 texture streams, including CKD-wrapped payloads. ImageSharp, BCnEncoder
KevInc.Texture.ImageSharp Shared ImageSharp adapters for raw, DXT, crunched, and DDS texture payloads. ImageSharp, BCnEncoder
KevInc.CrnLib Managed CRN texture encode/decode support. ImageSharp, BCnEncoder

Install

dotnet add package KevInc.Texture
dotnet add package KevInc.Texture.Ckd
dotnet add package KevInc.Texture.Nintendo
dotnet add package KevInc.Texture.Xbox

Use ImageSharp packages only when you want to work directly with Image<TPixel>:

dotnet add package KevInc.Texture.ImageSharp
dotnet add package KevInc.Texture.Nintendo.ImageSharp
dotnet add package KevInc.Texture.Xbox.ImageSharp

Examples

Decode a raw BGRA texture into ImageSharp:

using KevInc.Texture;
using KevInc.Texture.ImageSharp;

RawTexture texture = new(width, height, TextureFormat.BGRA32, data);
using Image<Rgba32> image = TextureImageSharpCodec.Decode(texture);

Decode an Xbox 360 texture stream:

using KevInc.Texture.Xbox.ImageSharp;

await using FileStream input = File.OpenRead("texture.x360");
using Image<Rgba32> image = Xbox360ImageSharpTextureCodec.Decode(input);

Decode a Nintendo Switch swizzled payload:

using KevInc.Texture;
using KevInc.Texture.Nintendo.ImageSharp;

using Image<Rgba32> image = NintendoSwitchImageSharpTextureCodec.DecodeSwizzled(
    swizzledData,
    width,
    height,
    TextureFormat.RGBA32,
    blockHeightLog2);

Register the ImageSharp decoders for DDS, Wii SSD, Wii U GTX, Switch XTX, and Xbox 360 texture streams:

using KevInc.Texture.ImageSharp;
using KevInc.Texture.Nintendo.ImageSharp;
using KevInc.Texture.Xbox.ImageSharp;

TextureImageSharpConfiguration.RegisterDdsFormat();
NintendoImageSharpConfiguration.RegisterTextureFormats();
Xbox360ImageSharpConfiguration.RegisterTextureFormat();

Build And Test

./run.ps1

Create local NuGet packages:

./run.ps1 -Configuration Release -Pack

Packages are written to artifacts/packages.

Publishing

See PUBLISHING.md for the GitHub, NuGet API key, release tag, and post-publish smoke-test checklist.

Test Coverage

The test suite covers wrapper handling, Nintendo swizzling, Xbox texture headers, ImageSharp adapters, dependency boundaries, CRN support, and game texture container round-trips.

Versioning

The repository uses Nerdbank.GitVersioning. Package versions come from version.json and Git metadata.

License

This repository is licensed under GPL-3.0-only unless a package explicitly states otherwise.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KevInc.CrnLib:

Package Downloads
KevInc.Texture.ImageSharp

ImageSharp adapters for decoding and encoding raw, DXT, and crunched texture payloads.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.3 112 5/10/2026
0.1.2 125 5/10/2026
0.1.1 111 5/10/2026