pub struct Image {
pub width: u16,
pub height: u16,
pub palette: [Rgb; 256],
pub buffer: Vec<u8>,
}
Expand description
Represents an XYZ image.
Fields§
§width: u16
Image height in pixels.
height: u16
Image width in pixels.
palette: [Rgb; 256]
List of colors used by the image.
buffer: Vec<u8>
Image data. This contains width * height
bytes, one for each
pixel in the image. The color of each pixel is determined by the
palette
array.
Implementations§
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more