Function png_framing::encode [] [src]

pub fn encode<T>(image: &Chunky<Rgba, T>) -> Result<CVec<u8>, Error> where
    T: AsRef<[u8]>, 

Encodes the image as a PNG, allocating memory for the encoded data.

The output is a dynamically-allocated array of bytes containing the compressed PNG data, suitable for sending over a network, saving as a file, or writing to /dev/null.