Skip to main content

apply

Function apply 

Source
pub fn apply(
    original: &DynamicImage,
    op: FilterOp,
    focal: Option<(f32, f32)>,
) -> DynamicImage
Expand description

Apply op to original (decoded image) and return the resized image. Filters are cheap-and-correct (Lanczos3). For Fill, focal (when Some) shifts the crop so the focal point stays inside the target rectangle — passes (0.5, 0.5) for “no focal set, use geometric center” semantics.