resize cropped image (plugin doesn't seem to allow specification of size)

This commit is contained in:
Max Bradbury 2020-11-07 10:54:52 +00:00
parent 37cde1713d
commit 013e1e1c8c
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ pub fn load_image(image_base64: String) -> String {
Ok(image) => { Ok(image) => {
match image::load_from_memory(image.as_ref()) { match image::load_from_memory(image.as_ref()) {
Ok(image) => { Ok(image) => {
let image = image.resize(128, 128, CatmullRom);
state.image = Some(image); state.image = Some(image);
"OK" "OK"
}, },