Struct png::Encoder[][src]

pub struct Encoder<W: Write> { /* fields omitted */ }
Expand description

PNG Encoder

Implementations

Set the color of the encoded image.

These correspond to the color types in the png IHDR data that will be written. The length of the image data that is later supplied must match the color type, otherwise an error will be emitted.

Set the indicated depth of the image data.

Set compression parameters.

Accepts a Compression or any type that can transform into a Compression. Notably deflate::Compression and deflate::CompressionOptions which “just work”.

Set the used filter type.

The default filter is FilterType::Sub which provides a basic prediction algorithm for sample values based on the previous. For a potentially better compression ratio, at the cost of more complex processing, try out FilterType::Paeth.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.