Trait smartcrop::Image

source ·
pub trait Image: Sized {
    // Required methods
    fn width(&self) -> u32;
    fn height(&self) -> u32;
    fn get(&self, x: u32, y: u32) -> RGB;
}
Expand description

Trait for images to be procressed by Smartcrop

Required Methods§

source

fn width(&self) -> u32

Get the width of the image

source

fn height(&self) -> u32

Get the height of the image

source

fn get(&self, x: u32, y: u32) -> RGB

Get the color of a pixel

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<I, P> Image for I
where I: GenericImage<Pixel = P> + 'static, P: Pixel<Subpixel = u8> + 'static,