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 theWrite
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.