Skip to content

Commit

Permalink
Merge pull request #620 from woelper/heif_detection
Browse files Browse the repository at this point in the history
fix: detect heif and heic as heif
  • Loading branch information
woelper authored Jan 17, 2025
2 parents d3e556b + c339e24 commit dcea71c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/image_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ pub fn open_image(
.to_str()
.unwrap_or_default()
.to_lowercase()
// add aliased extensions here if the same formats have multiple extensions
.replace("tiff", "tif")
.replace("jpeg", "jpg");
.replace("jpeg", "jpg")
.replace("heic", "heif");

// These are detected incorrectly, for example svg is xml etc
let unchecked_extensions = ["svg", "kra", "tga", "dng"];

if let Ok(fmt) = FileFormat::from_file(&img_location) {
Expand Down

0 comments on commit dcea71c

Please sign in to comment.