Open marcomastri opened 2 years ago
Wanting to stay close to the example, I made it work by replacing
let mut out = BytesMut::new().writer();
img.write_to(&mut out, out_format).expect("image encoded");
let out = out.into_inner().freeze();
with
let mut out = vec![];
img.write_to(&mut Cursor::new(&mut out), out_format).expect("image encoded");
let out = Bytes::from(out);
but I’m just dipping my toes in rust, and inexperienced with programming in general.
See https://github.com/image-rs/image/pull/1477