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

Image height in pixels.

Image width in pixels.

List of colors used by the image.

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]

Converts the image to a raw RGB buffer, suitable for the Piston image library.