Skip to main content

letterbox

Function letterbox 

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

Aspect-preserving resize followed by centered constant padding.