Expand description
Parser for the ktx2 texture container format.
§Features
- Async reading
- Parsing
- Validating
- Data format description
- Key/value data
§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§
- Channel
Type Qualifiers - Color
Model - Color
Primaries - Data
Format Flags - DfdBlock
- DfdBlock
Basic - DfdBlock
Header Basic - 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.
- KeyValue
Data Iterator - An iterator that parses the key-value pairs in the KTX2 file.
- Level
- Level
Index - Reader
- Decodes KTX2 texture data
- Sample
Information - Supercompression
Scheme - Known supercompression schemes
- Transfer
Function
Enums§
- Parse
Error - Error, that happened when data doesn’t satisfy expected parameters.