Skip to main content

save_image

Function save_image 

Source
pub fn save_image<P: AsRef<Path>>(
    image: &Image,
    path: P,
    compression: u8,
    quality: u8,
) -> Result<(), ImageError>
Expand description

Write an image, picking the encoder from the file extension.

compression is the PNG level (0-9) and quality the JPEG quality (1-100); each is ignored by the formats it does not apply to.