Skip to main content

letterbox

Function letterbox 

Source
pub fn letterbox<T: PixelComponent, const CHANNELS: usize>(
    input: ImageView<'_, T, CHANNELS>,
    output_width: usize,
    output_height: usize,
    interpolation: Interpolation,
    value: [T; CHANNELS],
) -> VisionResult<(Image<T, CHANNELS>, LetterboxTransform)>
Expand description

Aspect-preserving resize followed by centered constant padding.