Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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,