Trait aarty::PixelImage

source ·
pub trait PixelImage {
    // Required methods
    fn dimensions(&self) -> (u32, u32);
    fn get_pixel(&self, x: u32, y: u32) -> Rgba;
}
Expand description

Trait that represent the (normal) images, that we wanna transform them.

Required Methods§

source

fn dimensions(&self) -> (u32, u32)

Get the image dimensions (the width, and height).

source

fn get_pixel(&self, x: u32, y: u32) -> Rgba

Get the RGBA value of a specific pixel.

Implementors§

source§

impl<T, P> PixelImage for T
where T: GenericImageView<Pixel = P>, P: Into<Rgba> + Pixel<Subpixel = u8>,