ImageRef

Trait ImageRef 

Source
pub unsafe trait ImageRef {
    // Required methods
    fn format(&self) -> PixelFormat;
    fn width(&self) -> usize;
    fn height(&self) -> usize;
    fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>;
    fn color(&self) -> ColorInfo;
}
Expand description

§Safety

Values returned must always be the same every call

Required Methods§

Source

fn format(&self) -> PixelFormat

Source

fn width(&self) -> usize

Source

fn height(&self) -> usize

Source

fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>

Returns an iterator yielding every plane with their associated stride

Source

fn color(&self) -> ColorInfo

Trait Implementations§

Source§

impl ImageRef for &dyn ImageRef

Source§

fn format(&self) -> PixelFormat

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>

Returns an iterator yielding every plane with their associated stride
Source§

fn color(&self) -> ColorInfo

Source§

impl ImageRef for &mut dyn ImageRef

Source§

fn format(&self) -> PixelFormat

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>

Returns an iterator yielding every plane with their associated stride
Source§

fn color(&self) -> ColorInfo

Implementations on Foreign Types§

Source§

impl<T: ImageRef> ImageRef for &T

Source§

fn format(&self) -> PixelFormat

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>

Source§

fn color(&self) -> ColorInfo

Source§

impl<T: ImageRef> ImageRef for &mut T

Source§

fn format(&self) -> PixelFormat

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn planes(&self) -> Box<dyn Iterator<Item = (&[u8], usize)> + '_>

Source§

fn color(&self) -> ColorInfo

Implementors§

Source§

impl ImageRef for &dyn ImageRef

Source§

impl ImageRef for &mut dyn ImageMut

Source§

impl ImageRef for &mut dyn ImageRef

Source§

impl<S: AsRef<[u8]>> ImageRef for Image<S>

Source§

impl<T: ImageRef> ImageRef for Cropped<T>