[][src]Struct pixelate::Image

pub struct Image<'a> {
    pub palette: &'a [Color],
    pub pixels: &'a [u8],
    pub width: usize,
    pub scale: usize,
}

Fields

palette: &'a [Color]

Palette of colors, up to 255 colors

pixels: &'a [u8]

Unscaled pixels where each byte is a valid index into palette

width: usize

Width of the unscaled image, pixels length must be divisible by width

scale: usize

Scale to render the image at

Methods

impl<'a> Image<'a>[src]

pub fn render<W: Write>(&self, writer: W) -> Result<(), Error>[src]

Render the

Auto Trait Implementations

impl<'a> Send for Image<'a>

impl<'a> Sync for Image<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]