image filter

This commit is contained in:
Ponj 2024-07-23 17:47:18 +02:00
parent 3315342aa5
commit ba055093be
Signed by: p6nj
GPG key ID: CEAB625B75A836B2

View file

@ -54,6 +54,13 @@ impl Files {
FileDialog::new() FileDialog::new()
.set_title("Input image") .set_title("Input image")
.set_directory(working_dir()) .set_directory(working_dir())
.add_filter(
"images",
&ImageFormat::all()
.map(ImageFormat::extensions_str)
.flatten()
.collect::<Vec<&'static &'static str>>(),
)
.pick_file() .pick_file()
.context("no input image selected")?, .context("no input image selected")?,
FileDialog::new() FileDialog::new()