Struct pix_engine::image::Image [−][src]
pub struct Image { /* fields omitted */ }Expand description
An Image representing a buffer of pixel color values.
Implementations
Constructs an empty RGBA Image with given width and height. Alias for
Image::with_rgba.
Constructs an empty RGBA Image with given width and height.
Constructs an empty RGB Image with given width and height.
pub fn from_bytes<B: AsRef<[u8]>>(
width: u32,
height: u32,
bytes: B,
format: PixelFormat
) -> Result<Self>
pub fn from_bytes<B: AsRef<[u8]>>(
width: u32,
height: u32,
bytes: B,
format: PixelFormat
) -> Result<Self>
pub fn from_pixels<P: AsRef<[Color]>>(
width: u32,
height: u32,
pixels: P,
format: PixelFormat
) -> Result<Self>
pub fn from_pixels<P: AsRef<[Color]>>(
width: u32,
height: u32,
pixels: P,
format: PixelFormat
) -> Result<Self>
Constructs an Image from a Vec
Returns the Image pixel data as an iterator of u8.
Returns the Image pixel data as a Vec<u8>.
This consumes the Image, so we do not need to copy its contents.
Returns the Image pixel data as an iterator of Colors.
Returns the Image pixel data as a Vec<Color>.
Returns the color value at the given (x, y) position.
Sets the color value at the given (x, y) position.
Returns the Image pixel format.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Image
impl UnwindSafe for Image
Blanket Implementations
Mutably borrows from an owned value. Read more