KevInc.CrnLib
0.1.3
dotnet add package KevInc.CrnLib --version 0.1.3
NuGet\Install-Package KevInc.CrnLib -Version 0.1.3
<PackageReference Include="KevInc.CrnLib" Version="0.1.3" />
<PackageVersion Include="KevInc.CrnLib" Version="0.1.3" />
<PackageReference Include="KevInc.CrnLib" />
paket add KevInc.CrnLib --version 0.1.3
#r "nuget: KevInc.CrnLib, 0.1.3"
#:package KevInc.CrnLib@0.1.3
#addin nuget:?package=KevInc.CrnLib&version=0.1.3
#tool nuget:?package=KevInc.CrnLib&version=0.1.3
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 | Versions 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. |
-
net10.0
- BCnEncoder.Net.ImageSharp (>= 1.1.3)
- SixLabors.ImageSharp (>= 3.1.12)
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.