Struct repng::Encoder [] [src]

pub struct Encoder<W, F> { /* fields omitted */ }

The main object, which does all of the encoding work.

Methods

impl<W: Write, F> Encoder<W, F>
[src]

[src]

Make a new encoder, which writes to a given sink, with a custom filter.

This method also immediately writes the PNG headers to the sink.

[src]

Flush the encoder, writing any delayed data, and recover the sink.

[src]

Write a chunk with the given type and data.

Important traits for &'a mut W
[src]

Get access to the writer that this was built with.

Be careful, because you can easily corrupt the image with this method.

[src]

Reset the encoder to encode another image with the exact same options.

impl<W: Write, F: Filter> Encoder<W, F>
[src]

[src]

Feed zero or more rows to the encoder.

Rows are specified in top-to-bottom and left-to-right order.

Panics

This method panics if you try to write data that doesn't fit into a whole number of rows.

Trait Implementations

Auto Trait Implementations

impl<W, F> Send for Encoder<W, F> where
    F: Send,
    W: Send

impl<W, F> Sync for Encoder<W, F> where
    F: Sync,
    W: Sync