Expand description
KTX v1 texture storage format parsing.
Parses byte data according to https://www.khronos.org/registry/KTX/specs/1.0/ktxspec_v1.html.
§Example: Include at compile time
use ktx::{Ktx, include_ktx, KtxInfo};
// Include & use static ktx data
let image: Ktx<_> = include_ktx!("../tests/babg-bc3.ktx");
assert_eq!(image.pixel_width(), 260);
§Example: Read at runtime
use ktx::KtxInfo;
let decoder = ktx::Decoder::new(buf_reader)?;
assert_eq!(decoder.pixel_width(), 260);
Re-exports§
pub use header::KtxInfo;
pub use read::KtxDecoder as Decoder;
pub use slice::Ktx;
Modules§
Macros§
- include_
ktx - Wrapper for
include_bytes!
returningKtx<'static [u8]>