https://github.com/alexheretic/ktx
Rust KTX texture storage format parsing
https://github.com/alexheretic/ktx
ktx
Last synced: 3 days ago
JSON representation
Rust KTX texture storage format parsing
- Host: GitHub
- URL: https://github.com/alexheretic/ktx
- Owner: alexheretic
- License: apache-2.0
- Created: 2019-04-10T09:00:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T00:18:23.000Z (almost 2 years ago)
- Last Synced: 2025-04-23T04:52:13.333Z (6 days ago)
- Topics: ktx
- Language: Rust
- Homepage:
- Size: 10.3 MB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ktx
[](https://crates.io/crates/ktx)
[](https://docs.rs/ktx)
==========KTX v1 texture storage format parsing.
Parses byte data according to [https://www.khronos.org/registry/KTX/specs/1.0/ktxspec_v1.html](https://www.khronos.org/registry/KTX/specs/1.0/ktxspec_v1.html).
```rust
// Include & use static ktx data
use ktx::{Ktx, include_ktx, KtxInfo};let image: Ktx<_> = include_ktx!("../tests/babg-bc3.ktx");
assert_eq!(image.pixel_width(), 260);
``````rust
// Read ktx data at runtime
use ktx::KtxInfo;let decoder = ktx::Decoder::new(buf_reader)?;
assert_eq!(decoder.pixel_width(), 260);
```## Minimum supported rust compiler
This crate is maintained with [latest stable rust](https://gist.github.com/alexheretic/d1e98d8433b602e57f5d0a9637927e0c).