Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexheretic/ktx
Rust KTX texture storage format parsing
https://github.com/alexheretic/ktx
ktx
Last synced: about 1 month 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-20T00:18:23.000Z (over 1 year ago)
- Last Synced: 2024-10-31T11:52:16.122Z (about 2 months ago)
- Topics: ktx
- Language: Rust
- Homepage:
- Size: 10.3 MB
- Stars: 11
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ktx
[![crates.io](https://img.shields.io/crates/v/ktx.svg)](https://crates.io/crates/ktx)
[![Documentation](https://docs.rs/ktx/badge.svg)](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).