pub fn trim_and_pad(img: &RgbaImage, pad: u32) -> Option<RgbaImage>
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.
img
pad
None