Enum KtxSupercompression
How a KTX 2 file's mip levels are compressed on top of their texture format.
public enum KtxSupercompression
Fields
BasisLZ = 1Basis Universal's BasisLZ, for ETC1S textures: codebooks in the global data, Huffman-coded slices in the levels.
None = 0Not supercompressed; always so in KTX 1.
Zlib = 3zlib, each level on its own.
Zstandard = 2Zstandard, each level on its own.
Examples
// What the file says: the Vulkan format, supercompression, layout, mips, colour, orientation and key/value data.
using Raster texture = Raster.Load("texture.ktx2", context);
if (texture.Metadata.FormatDetails is KtxDetails ktx)
{
Console.WriteLine($"{ktx.FormatName} (VkFormat {ktx.VkFormat}), {ktx.Supercompression}, {ktx.MipLevels} mips");
Console.WriteLine($"{ktx.Dimension}, cube: {ktx.IsCube}, sRGB {ktx.IsSrgb}, alpha {ktx.AlphaMode}, orientation {ktx.Orientation}");
foreach ((string key, string value) in ktx.KeyValues)
{
Console.WriteLine($"{key} = {value}");
}
}