Realm

oa::image::random_crop

Crop a width×height window at a seed-derived uniform offset. The offset is drawn uniformly over the valid top-left range from seed, keeping the crop itself a single recorded device operation. Errors Returns an error when the window is zero-sized or exceeds input, or the crop fails.

FnRust public API

Function Documentation

pub fn random_crop( input: &Image, width: u32, height: u32, seed: u64 ) -> Result<Image>
Crop a width×height window at a seed-derived uniform offset. The offset is drawn uniformly over the valid top-left range from seed, keeping the crop itself a single recorded device operation. Errors Returns an error when the window is zero-sized or exceeds input, or the crop fails.