Sniffs the ISO-BMFF ftyp box. Never trust a file extension
or MIME type for this — Windows often reports an empty type
for real HEIC files (ADR-0008).
Rules: an AVIF brand anywhere disqualifies the file (AVIF is
a different codec, @dusrel/image-avif — and AVIF files often
list the generic mif1 brand as compatible, so that brand
alone proves nothing). Otherwise a HEVC brand as major or
compatible brand, or a generic HEIF major brand, counts;
libheif still reports a precise error if a generic-brand
file's media turns out not to be HEVC.
Sniffs the ISO-BMFF
ftypbox. Never trust a file extension or MIME type for this — Windows often reports an empty type for real HEIC files (ADR-0008).Rules: an AVIF brand anywhere disqualifies the file (AVIF is a different codec, @dusrel/image-avif — and AVIF files often list the generic
mif1brand as compatible, so that brand alone proves nothing). Otherwise a HEVC brand as major or compatible brand, or a generic HEIF major brand, counts; libheif still reports a precise error if a generic-brand file's media turns out not to be HEVC.