Skip to content

Commit

Permalink
allow heix ftype brand for heifs (imgproxy#1341)
Browse files Browse the repository at this point in the history
* allow heix ftype brand for heifs

* use bytes not strings
  • Loading branch information
jtomson authored Oct 14, 2024
1 parent d9e88ff commit 5bce3c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imagemeta/heif.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
const heifBoxHeaderSize = uint64(8)

var heicBrand = []byte("heic")
var heixBrand = []byte("heix")
var avifBrand = []byte("avif")
var heifPict = []byte("pict")

Expand Down Expand Up @@ -93,7 +94,7 @@ func heifReadBoxHeader(r io.Reader) (boxType string, boxDataSize uint64, err err
}

func heifAssignFormat(d *heifData, brand []byte) bool {
if bytes.Equal(brand, heicBrand) {
if bytes.Equal(brand, heicBrand) || bytes.Equal(brand, heixBrand) {
d.Format = imagetype.HEIC
return true
}
Expand Down

0 comments on commit 5bce3c7

Please sign in to comment.