Skip to main content

image_frame

Function image_frame 

Source
pub fn image_frame(
    img: &DynamicImage,
    canvas: &Canvas,
    fit: Fit,
) -> Result<Frame>
Expand description

img as a canvas-sized frame: Stretch ignores the aspect ratio, Contain letterboxes in black, Cover crops. Lanczos3 throughout.

ยงErrors

Fails if the resampled image does not match the canvas size.