Struct pcx::WriterRgb[][src]

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

Create 24-bit RGB PCX image.

Methods

impl WriterRgb<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> WriterRgb<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 from separate buffers for R, G and B channels.

Length of each of r, g and b 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.

Write next row of pixels from buffer which contains RGB values interleaved (i.e. R, G, B, R, G, B, ...).

Length of the rgb buffer must be equal to the width of the image passed to new multiplied by 3. 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.

Flush all data and finish writing.

If you simply drop WriterRgb it will also flush everything but this function is preferable because errors won't be ignored.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

impl<W: Write> Drop for WriterRgb<W>
[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

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

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