Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported heif files with "heix" majorBrand #432

Open
Thorsten42 opened this issue Jan 1, 2025 · 0 comments
Open

unsupported heif files with "heix" majorBrand #432

Thorsten42 opened this issue Jan 1, 2025 · 0 comments

Comments

@Thorsten42
Copy link

Hi,

I am using imaginary in combination with nextcloud to create preview images. I noticed that *.heif files created using my sony camera (a6700) are unsupported by imaginary, and I get the error message: Unsupported media type.

Since heic files are generally supported, I looked into the code and noticed that the error is raised in line 104 in controllers.go because the mime type detected by http.DetectContentType is "application/octet-stream", and the filetype.Get method cannot detect the type via magic numbers.

Looking further into the filetype function and why the file is not detected as a heic file, I found that the majorBrand is "heix" with the compatibleBrands: [mif1 heix miaf MiHA jpeg SHIF].

Adjusting the heif function in the filetype module to recognize these files as "image/heif" unfortunately caused another issue:
Error while processing the image: Unsupported image format, which seems to originate from the bimg.Size(buf) function at line 123 in controllers.go. Unfortunately, I am currently stuck because I cannot build bimg locally to investigate further.

Do you think this is just an issue of a wrongly detected image type, or are heif/heix images generally unsupported? I’ve added an example image (compressed as a zip file, as github does not allow direct uploads of heif files).

Thanks

DSC00070.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant