Load Image from File Explorer Option

I am using an fltk library to create a rust image processing application
I am unable to load the image from file explorer option.
My code:

btn6.set_callback(|_| {
let mut dialog = fltk::dialog::NativeFileChooser::new(
fltk::dialog::NativeFileChooserType::BrowseMultiFile,
);
dialog.show();
println!("{:?}", dialog.filenames());
});

let img = Rc::new(RefCell::new(image::open("cat.jpg").unwrap()));

Please help me out.

What is the issue you have? Does it crash? Does it return an incorrect result? Or something else?

So what I am trying to do is that I select the image from file explorer and that image gets displayed. The problem that I am facing, is after selecting an image I am unable to open it. Reason being I am unable to pass the path of the image outside the button

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.