4 releases (breaking)

0.5.0 Apr 19, 2026
0.4.0 Mar 24, 2025
0.3.0 Feb 3, 2022
0.2.0 Oct 3, 2021

#146 in Parser implementations

Download history 49975/week @ 2026-02-24 59460/week @ 2026-03-03 60131/week @ 2026-03-10 51797/week @ 2026-03-17 62255/week @ 2026-03-24 63967/week @ 2026-03-31 65264/week @ 2026-04-07 58766/week @ 2026-04-14 51256/week @ 2026-04-21 44289/week @ 2026-04-28 53108/week @ 2026-05-05 57438/week @ 2026-05-12 53249/week @ 2026-05-19 67093/week @ 2026-05-26 62532/week @ 2026-06-02 70306/week @ 2026-06-09

263,003 downloads per month
Used in 209 crates (15 directly)

Apache-2.0

145KB
2K SLoC

ktx2

GitHub Actions Workflow Status Crates.io Documentation License

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<_>>();

Testing

Running tests requires the ktx CLI from KTX-Software to be installed and available on your PATH.

MSRV

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

License: Apache-2.0

Dependencies

~95KB