From 1dc82485bdcf3e338307ef11d3b6b8895dc3f49a Mon Sep 17 00:00:00 2001 From: conglinyizhi Date: Sat, 7 Dec 2024 13:25:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(color=5Fframe):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=9B=BE=E5=83=8F=E5=88=B7=E6=96=B0=E6=97=B6=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E6=9C=AA=E6=AD=A3=E7=A1=AE=E8=B0=83=E6=95=B4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0268e3b..c594164 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,6 +70,7 @@ fn main() { let fltk_rgb_image = RgbImage::new(rgb_data.as_raw(), w, h, ColorDepth::Rgb8).unwrap(); color_frame.set_image(Some(fltk_rgb_image)); + // 通过重新调整尺寸从而刷新图像 color_frame.set_size(w, h); color_frame.redraw(); let duration = start.elapsed(); @@ -80,7 +81,7 @@ fn main() { let fltk_l_image = RgbImage::new(l_data.as_raw(), w, h, ColorDepth::L8).unwrap(); camera_frame.set_image(Some(fltk_l_image)); - // 通过重新调整尺寸从而刷新图像 + color_frame.set_size(w, h); camera_frame.redraw(); let duration = start.elapsed(); println!("RGB8 Frame Draw use time: {:?}", duration);