Struct repng::Encoder [] [src]

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

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


impl<W: Write, F> Encoder<W, F>


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.


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


Write a chunk with the given type and data.

Important traits for &'a mut W

Get access to the writer that this was built with.

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


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

impl<W: Write, F: Filter> Encoder<W, F>


Feed zero or more rows to the encoder.

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


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