Skip to main content

read_dds_from_bytes

Function read_dds_from_bytes 

Source
pub fn read_dds_from_bytes(bytes: &[u8]) -> Result<Dds, DdsBinaryError>
Expand description

Reads DDS data from bytes.

§Errors

DdsBinaryError::InvalidHeader when bytes are neither a standard DDS container nor the engine’s prefixed variant, and DdsBinaryError::Ddsfile when the standard header parses as malformed. Which of the two forms was read is recorded on the result, so a round trip re-emits the one it came from.