Skip to main content

Module png

Module png 

Source
Expand description

PNG encoder (via the png crate).

Supports Rgb8, Gray8, and Rgba8 bitmaps directly. Other modes return EncodeError::UnsupportedMode — convert to one of the above before encoding.

PNG is lossless and handles transparency (alpha plane) correctly. Use this format in preference to PPM when the bitmap has an alpha plane.

Functions§

write_png
Write bitmap to out as a PNG image.