Struct img::ImageBuffer
[−]
[src]
pub struct ImageBuffer<PixelP> where
PixelP: Pixel, { /* fields omitted */ }
TODO: Struct documentation
Trait Implementations
impl<PixelP: Clone> Clone for ImageBuffer<PixelP> where
PixelP: Pixel,
[src]
PixelP: Pixel,
fn clone(&self) -> ImageBuffer<PixelP>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<PixelP> Image for ImageBuffer<PixelP> where
PixelP: Pixel,
[src]
PixelP: Pixel,
TODO: Impl documentation
type PixelT = PixelP
The Pixel
type of this image. Read more
fn get_size_in_bytes(&self) -> usize
Returns the memory size for the whole image in bytes.
fn load_from_raw_buffer(&mut self, buffer: &[u8])
Loads an Image
out of a raw buffer. Read more
fn write_into_raw_buffer(&self, buffer: &mut [u8])
Writes an Image
into a raw buffer. Read more
fn width(&self) -> u32
Returns the width of the image in pixels.
fn height(&self) -> u32
Returns the height of the image in pixels.
fn pitch(&self) -> u32
Returns the pitch of the image in bytes.
fn get_pixel(&self, x: u32, y: u32) -> Option<PixelP>
Retrieve the pixel for a given location (x
, y
). Read more
fn set_pixel(&mut self, x: u32, y: u32, value: PixelP)
Stores a pixel at a location (x
, y
) in the Image
. Read more