From 073faaeccb9b41d4830fe57e395520db9ff16361 Mon Sep 17 00:00:00 2001 From: Afifurrohman Date: Sat, 6 Jul 2024 16:44:25 +0700 Subject: [PATCH] fix: Change image API endpoint (#12) --- src/img.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/img.rs b/src/img.rs index 581898a..28e83e9 100644 --- a/src/img.rs +++ b/src/img.rs @@ -35,9 +35,9 @@ pub fn crop_image(buff: &[u8]) -> Vec> { let cropped_img = img.crop(start_x, start_y, PART_SIZE, PART_SIZE); let mut buffer = Cursor::new(Vec::new()); - cropped_img - .write_to(&mut buffer, IMAGE_FORMAT) - .unwrap(); + + cropped_img.write_to(&mut buffer, IMAGE_FORMAT).unwrap(); + let buffer = buffer.into_inner(); results.push(buffer) }