Realm

oa::video::letterbox

Aspect-preserving resize into a fixed extent with a constant fill. fill is a YUV code triplet in the frame’s component range. Errors Returns an error for a non-device-planar frame or a zero extent.

FnRust public API

Function Documentation

pub fn letterbox( frame: &VideoFrame, width: u32, height: u32, fill: [u8; 3], interpolation: VideoInterpolation ) -> Result<VideoFrame>
Aspect-preserving resize into a fixed extent with a constant fill. fill is a YUV code triplet in the frame’s component range. Errors Returns an error for a non-device-planar frame or a zero extent.