Skip to main content

thumbnail

Function thumbnail 

Source
pub fn thumbnail(
    data: &[u8],
    width: u32,
    height: u32,
    crop: bool,
) -> Option<(Vec<u8>, &'static str)>
Expand description

A thumbnail of an image, or None when it is not a decodable image (ciphertext, other files) or the feature is off; callers then serve the original. Never enlarges.