Skip to main content

trim_and_pad

Function trim_and_pad 

Source
pub fn trim_and_pad(img: &RgbaImage, pad: u32) -> Option<RgbaImage>
Expand description

Crops img to the bounding box of its pixels with alpha above 0 and adds pad transparent pixels on every side; None when nothing is visible.