Add support for other HEIF mimetype

This commit is contained in:
Paul van Santen 2019-12-24 10:41:21 +01:00
parent 474300f17e
commit 2e72fc0243
No known key found for this signature in database
GPG key ID: AD10F40CB69516B6
2 changed files with 7 additions and 0 deletions

View file

@ -646,6 +646,12 @@ func vipsImageType(buf []byte) ImageType {
// https://github.com/strukturag/libheif/issues/83#issuecomment-421427091
if IsTypeSupported(HEIF) && buf[4] == 0x66 && buf[5] == 0x74 && buf[6] == 0x79 && buf[7] == 0x70 &&
buf[8] == 0x68 && buf[9] == 0x65 && buf[10] == 0x69 && buf[11] == 0x63 {
// This is a HEIC file
return HEIF
}
if IsTypeSupported(HEIF) && buf[4] == 0x66 && buf[5] == 0x74 && buf[6] == 0x79 && buf[7] == 0x70 &&
buf[8] == 0x6d && buf[9] == 0x69 && buf[10] == 0x66 && buf[11] == 0x31 {
// This is a HEIF file
return HEIF
}