Skip to main content

animated_format

Function animated_format 

Source
pub fn animated_format(bytes: &[u8]) -> Option<&'static str>
Expand description

If bytes is an animated image we must not re-encode, return its extension ("gif"/"webp"/"png"); otherwise None. Biased toward detecting animation: a false positive only skips stripping/compression, whereas a false negative would flatten the animation to a still.