Skip to content

Commit

Permalink
add hdr loading and saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed May 12, 2024
1 parent b21d1be commit b7f78b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Simp is a fast and simple GPU-accelerated image manipulation program.
| JPEG XL | ✅ (5) ||
| OpenEXR |||
| qoi |||
| hdr |||

1. Building with AVIF support requires the C library dav1d and is therefore not enabled by default.
2. SVGs are rastarized because Simp is primarily a bitmap image editor.
Expand Down
2 changes: 2 additions & 0 deletions src/app/save_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn open(name: String, proxy: EventLoopProxy<UserEvent>, wgpu: &WgpuState) {
.add_filter("farbfeld", &["ff", "farbfeld"])
.add_filter("TGA", &["tga"])
.add_filter("QOI", &["qoi"])
.add_filter("HDR", &["hdr"])
.add_filter("EXR", &["exr"]);

thread::spawn(move || {
Expand Down Expand Up @@ -86,6 +87,7 @@ pub fn save(
}

let res = match ext.as_str() {
"hdr" => save_with_format(path, &frames[0], ImageFormat::Hdr),
"png" => save_with_format(path, &frames[0], ImageFormat::Png),
"qoi" => save_with_format(path, &frames[0], ImageFormat::Qoi),
"jpg" | "jpeg" | "jpe" | "jif" | "jfif" => {
Expand Down

0 comments on commit b7f78b4

Please sign in to comment.