Struct xyz::Image
[−]
[src]
pub struct Image { pub width: u16, pub height: u16, pub palette: [Rgb; 256], pub buffer: Vec<u8>, }
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.
Methods
impl Image
[src]
fn to_rgb_buffer(&self) -> Vec<u8>
Converts the image to a raw RGB buffer, suitable for the Piston
image
library.