Function cosmic::iced_widget::renderer::graphics::image::image_rs::guess_format
source ยท pub fn guess_format(buffer: &[u8]) -> Result<ImageFormat, ImageError>
Expand description
Guess image format from memory block
Makes an educated guess about the image format based on the Magic Bytes at the beginning. TGA is not supported by this function. This is not to be trusted on the validity of the whole memory block