Function pconvert_rust::utils::encode_png
source · pub fn encode_png(
writable_buff: impl Write,
png: &ImageBuffer<Rgba<u8>, Vec<u8>>,
compression: CompressionType,
filter: FilterType
) -> Result<(), PConvertError>Expand description
Encodes a PNG and writes it to a buffer.
Arguments
writable_buff- Any buffer structure that implements theWritetrait.png- A byte buffer with the image data.compression- Compression type to use in the encoding.filter- Filter type to use in the encoding.