🐛 fix(color_frame): 修复图像刷新时尺寸未正确调整的问题
This commit is contained in:
parent
06709c9fa5
commit
1dc82485bd
|
@ -70,6 +70,7 @@ fn main() {
|
||||||
let fltk_rgb_image =
|
let fltk_rgb_image =
|
||||||
RgbImage::new(rgb_data.as_raw(), w, h, ColorDepth::Rgb8).unwrap();
|
RgbImage::new(rgb_data.as_raw(), w, h, ColorDepth::Rgb8).unwrap();
|
||||||
color_frame.set_image(Some(fltk_rgb_image));
|
color_frame.set_image(Some(fltk_rgb_image));
|
||||||
|
// 通过重新调整尺寸从而刷新图像
|
||||||
color_frame.set_size(w, h);
|
color_frame.set_size(w, h);
|
||||||
color_frame.redraw();
|
color_frame.redraw();
|
||||||
let duration = start.elapsed();
|
let duration = start.elapsed();
|
||||||
|
@ -80,7 +81,7 @@ fn main() {
|
||||||
let fltk_l_image =
|
let fltk_l_image =
|
||||||
RgbImage::new(l_data.as_raw(), w, h, ColorDepth::L8).unwrap();
|
RgbImage::new(l_data.as_raw(), w, h, ColorDepth::L8).unwrap();
|
||||||
camera_frame.set_image(Some(fltk_l_image));
|
camera_frame.set_image(Some(fltk_l_image));
|
||||||
// 通过重新调整尺寸从而刷新图像
|
color_frame.set_size(w, h);
|
||||||
camera_frame.redraw();
|
camera_frame.redraw();
|
||||||
let duration = start.elapsed();
|
let duration = start.elapsed();
|
||||||
println!("RGB8 Frame Draw use time: {:?}", duration);
|
println!("RGB8 Frame Draw use time: {:?}", duration);
|
||||||
|
|
Loading…
Reference in New Issue