Skip to main content

write_png

Function write_png 

Source
pub fn write_png(
    target: impl Into<OutputTarget>,
    width: u32,
    height: u32,
    rgba: &[u8],
) -> Result<(), EncodeError>
Expand description

Writes rgba, width by height 8-bit RGBA pixels with straight alpha, row by row, as a PNG at target, published as write_whole publishes a file: whole or not at all.

ยงErrors

When rgba is not that many pixels, or as write_whole.