Trait rasterize::Image [−][src]
pub trait Image { type Pixel; fn data(&self) -> &[Self::Pixel]; fn shape(&self) -> Shape; fn size(&self) -> Size { ... } fn width(&self) -> usize { ... } fn height(&self) -> usize { ... } fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel> { ... } fn as_ref(&self) -> ImageRef<'_, Self::Pixel> { ... } fn iter(&self) -> ImageIter<'_, Self::Pixel>ⓘ { ... } fn write_ppm<W>(&self, out: W) -> Result<(), Error>
where
W: Write,
Self::Pixel: Color,
Self: Sized, { ... } fn write_bmp<W>(&self, out: W) -> Result<(), Error>
where
W: Write,
Self::Pixel: Color,
Self: Sized, { ... } }
Associated Types
Loading content...Required methods
fn data(&self) -> &[Self::Pixel]
[src]
Data containing image
fn shape(&self) -> Shape
[src]
Shape of the image
Provided methods
fn size(&self) -> Size
[src]
Image size
fn width(&self) -> usize
[src]
Image width
fn height(&self) -> usize
[src]
Image height
fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
[src]
fn as_ref(&self) -> ImageRef<'_, Self::Pixel>
[src]
fn iter(&self) -> ImageIter<'_, Self::Pixel>ⓘ
[src]
Iterate over pixels
fn write_ppm<W>(&self, out: W) -> Result<(), Error> where
W: Write,
Self::Pixel: Color,
Self: Sized,
[src]
W: Write,
Self::Pixel: Color,
Self: Sized,
Write image in PPM format
fn write_bmp<W>(&self, out: W) -> Result<(), Error> where
W: Write,
Self::Pixel: Color,
Self: Sized,
[src]
W: Write,
Self::Pixel: Color,
Self: Sized,
Write image in BMP format
Implementations on Foreign Types
Loading content...Implementors
impl<'a, P> Image for ImageMutRef<'a, P>
[src]
impl<'a, P> Image for ImageMutRef<'a, P>
[src]