-
Hi, I can't see in docs or examples how to convert an image to another type? I have loaded it:
|
Beta Was this translation helpful? Give feedback.
Answered by
fintelia
Feb 2, 2024
Replies: 1 comment 1 reply
-
You want to use the let mut bytes: Vec<u8> = Vec::new();
img.write_to(&mut Cursor::new(&mut bytes), image::ImageOutputFormat::WebP)?; |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sekoyo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You want to use the
write_to
method: