Skip to main content

ktx2_buffer_to_image

Function ktx2_buffer_to_image 

Source
pub fn ktx2_buffer_to_image(
    buffer: &[u8],
    supported_compressed_formats: CompressedImageFormats,
    is_srgb: bool,
) -> Result<Image, TextureError>
Expand description

Converts KTX2 bytes to a bevy Image using the given compressed format support.

ยงErrors

Returns an error if the provided buffer contained invalid data, decompression fails, or transcoding of unsupported data formats fails.