pub fn encode(
image: &DynamicImage,
encoding: &EncodingOps,
source_mime: &str,
) -> Result<(Vec<u8>, String, String), String>Expand description
Encode image per the supplied EncodingOps, applying
background-color flattening when targeting a non-alpha format
(JPEG). Returns (bytes, mime, extension). With no format, or
format-auto, the format comes from auto_format.
ยงErrors
Encoder failures from the image crate.