mcraiha / libktxsharp

Managed C# library for handling KTX File Format
The Unlicense
9 stars 3 forks source link
csharp ktx lib

libktxsharp

C# library for handling KTX File Format. Only Version 1 is supported, so Version 2 is NOT supported.

Build status

Nuget

https://www.nuget.org/packages/LibKTX/

Why

Because KTX specs are public and I need something like this for my upcoming projects

How to use

  1. Get nuget, build .dll or include lib folder in your project
  2. Use following code example
    
    using KtxSharp;

byte[] ktxBytes = File.ReadAllBytes("myImage.ktx");

KtxStructure ktxStructure = null; using (MemoryStream ms = new MemoryStream(ktxBytes)) { ktxStructure = KtxLoader.LoadInput(ms); }

Console.WriteLine(ktxStructure.header.pixelWidth);


## How do I build this

### Requirements

Dotnet core 2.0 (or newer) environment

### Build .dll

Move to lib folder and run
```bash
dotnet build

Build nuget

Move to lib folder and run

dotnet pack -o out --configuration Release --include-source --include-symbols

Testing

Requirements

All requirements are restored when you run

dotnet restore

Run tests

Just call

dotnet test

What is in

What is partially in

What is missing

License

All code is released under "Do whatever you want" license aka Unlicense