-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Currently the function ktx::Ktx::new panics if an invalid file is provided:
fn main() {
unsafe {
ktx::Ktx::new(std::fs::read("/home/fctorial/.zshrc").unwrap());
}
}
What should I do if I'm trying to load an unknown ktx file, for example, a file that I'm receiving over the network. Is there another function that returns an std::error::Error if the provided file is invalid? Does the library currently perform sanity checks on the input file (pixel_height == 0 && pixel_depth != 0 is invalid, numArrayLayers must be zero for 3d images, cubemaps must be 2d)?
Metadata
Metadata
Assignees
Labels
No labels