mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
Add support for other HEIF mimetype
This commit is contained in:
parent
474300f17e
commit
2e72fc0243
2 changed files with 7 additions and 0 deletions
6
vips.go
6
vips.go
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue