Struct pcx::WriterPaletted[][src]

pub struct WriterPaletted<W: Write> { /* fields omitted */ }

Create paletted PCX image.

Methods

impl WriterPaletted<BufWriter<File>>
[src]

Start writing PCX file. This function will create a file if it does not exist, and will overwrite it if it does.

If you are not sure what to pass to dpi value just use something like (100, 100) or (300, 300).

impl<W: Write> WriterPaletted<W>
[src]

Create new PCX writer.

If you are not sure what to pass to dpi value just use something like (100, 100) or (300, 300).

Write next row of pixels.

Row length must be equal to the width of the image passed to new. This function must be called number of times equal to the height of the image.

Order of rows is from top to bottom, order of pixels is from left to right.

Since palette is written to the end of PCX file this function must be called only after writing all the pixels.

Palette length must be not larger than 256*3 = 768 bytes and be divisible by 3. Format is R, G, B, R, G, B, ...

Trait Implementations

impl<W: Clone + Write> Clone for WriterPaletted<W>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<W: Debug + Write> Debug for WriterPaletted<W>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<W> Send for WriterPaletted<W> where
    W: Send

impl<W> Sync for WriterPaletted<W> where
    W: Sync