Implementations§
Trait Implementations§
source§impl<'a, T: Type, C: Color> Image<T, C> for ImageRef<'a, T, C>
impl<'a, T: Type, C: Color> Image<T, C> for ImageRef<'a, T, C>
fn width(&self) -> usize
fn height(&self) -> usize
fn channels(&self) -> usize
source§fn index(&self, x: usize, y: usize, c: usize) -> usize
fn index(&self, x: usize, y: usize, c: usize) -> usize
Get the offset of the component at (x, y, c)
source§fn empty_pixel(&self) -> Vec<T>
fn empty_pixel(&self) -> Vec<T>
Create a new, empty pixel with each component set to 0
source§fn at_mut(&mut self, x: usize, y: usize) -> &mut [T] ⓘ
fn at_mut(&mut self, x: usize, y: usize) -> &mut [T] ⓘ
Get a vector of mutable references to each component at (x, y)
source§fn at(&self, x: usize, y: usize) -> &[T] ⓘ
fn at(&self, x: usize, y: usize) -> &[T] ⓘ
Get a vector of immutable references to each component at (x, y)
source§fn get_pixel<'a, P: PixelMut<'a, T, C>>(&self, x: usize, y: usize, px: &mut P)
fn get_pixel<'a, P: PixelMut<'a, T, C>>(&self, x: usize, y: usize, px: &mut P)
Load data from the pixel at (x, y) into px
source§fn set_pixel<'a, P: Pixel<'a, T, C>>(&mut self, x: usize, y: usize, px: &P)
fn set_pixel<'a, P: Pixel<'a, T, C>>(&mut self, x: usize, y: usize, px: &P)
Set data at (x, y) from px
source§fn get_f(&self, x: usize, y: usize, c: usize) -> f64
fn get_f(&self, x: usize, y: usize, c: usize) -> f64
Get a single component at (x, y, c) as a noramlized f64 value
source§fn set_f(&mut self, x: usize, y: usize, c: usize, f: f64)
fn set_f(&mut self, x: usize, y: usize, c: usize, f: f64)
Set the component at (x, y, c) using a normalized f64 value
source§fn as_image_ref(&mut self) -> ImageRef<'_, T, C>
fn as_image_ref(&mut self) -> ImageRef<'_, T, C>
Convert Image to ImageRef
source§fn for_each<F: Sync + Send + Fn((usize, usize), &mut [T])>(&mut self, f: F)
fn for_each<F: Sync + Send + Fn((usize, usize), &mut [T])>(&mut self, f: F)
Iterate over each pixel
source§fn crop(&self, x: usize, y: usize, width: usize, height: usize) -> ImageBuf<T, C>
fn crop(&self, x: usize, y: usize, width: usize, height: usize) -> ImageBuf<T, C>
Create a new image from the region specified by (x, y, width, height)