Crate ktx2

Source
Expand description

Parser for the ktx2 texture container format.

§Features

§Example

// Crate instance of reader. This validates the header
let mut reader = ktx2::Reader::new(file).expect("Can't create reader"); // Crate instance of reader.

// Get general texture information.
let header = reader.header();

// Read iterator over slices of each mipmap level.
let levels = reader.levels().collect::<Vec<_>>();

§MSRV

The minimum supported Rust version is 1.56. MSRV bumps are treated as breaking changes.

Structs§

ChannelTypeQualifiers
ColorModel
ColorPrimaries
DataFormatFlags
DfdBlock
DfdBlockBasic
DfdBlockHeaderBasic
DfdHeader
Format
Known texture formats
Header
Container-level metadata
Index
An index giving the byte offsets from the start of the file and byte sizes of the various sections of the KTX2 file.
KeyValueDataIterator
An iterator that parses the key-value pairs in the KTX2 file.
Level
LevelIndex
Reader
Decodes KTX2 texture data
SampleInformation
SupercompressionScheme
Known supercompression schemes
TransferFunction

Enums§

ParseError
Error, that happened when data doesn’t satisfy expected parameters.