pub fn is_image(buf: &[u8]) -> bool
Determines whether a buffer is an image type.
let v = [0xFF, 0xD8, 0xFF, 0xAA]; assert!(infer::is_image(&v));