[][src]Function pconvert_rust::utils::encode_png

pub fn encode_png(
    writable_buff: impl Write,
    png: &ImageBuffer<Rgba<u8>, Vec<u8>>,
    compression: CompressionType,
    filter: FilterType
) -> Result<(), PConvertError>

Encodes a PNG and writes it to a buffer.

Arguments

  • writable_buff - Any buffer structure that implements the Write trait.
  • png - A byte buffer with the image data.
  • compression - Compression type to use in the encoding.
  • filter - Filter type to use in the encoding.