Struct nannou::image::codecs::png::PngEncoder[][src]

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

PNG encoder

Implementations

Create a new encoder that writes its output to w

Create a new encoder that writes its output to w with CompressionType compression and FilterType filter.

It is best to view the options as a hint to the implementation on the smallest or fastest option for encoding a particular image. That is, using options that map directly to a PNG image parameter will use this parameter where possible. But variants that have no direct mapping may be interpreted differently in minor versions. The exact output is expressly not part the SemVer stability guarantee.

Note that it is not optimal to use a single filter type. It is likely that the library used will at some point gain the ability to use adaptive filtering methods per pixel row (or even interlaced row). We might make it the new default variant in which case choosing a particular filter method likely produces larger images. Be sure to check the release notes once in a while.

Encodes the image data that has dimensions width and height and ColorType c.

Trait Implementations

Writes all the bytes in an image to the encoder. Read more

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.