https://github.com/BestImageViewer/geeqie/issues/901
AVIF loading depends on the magic numbers, and the current list of known magics in src/image-load.c
is: ftypheic, ftypmsf1, ftypmif1. This is okay for HEIF, but AVIF is a different beast with a different codec and a different magic ftypavif (which is generated by gimp and darktable), and a different file extension (.avif)
if (il->bytes_total >= 12 &&
((memcmp(il->mapped_file + 4, "ftypheic", 8) == 0) ||
(memcmp(il->mapped_file + 4, "ftypmsf1", 8) == 0) ||
- (memcmp(il->mapped_file + 4, "ftypmif1", 8) == 0)))
+ (memcmp(il->mapped_file + 4, "ftypmif1", 8) == 0) ||
+ (memcmp(il->mapped_file + 4, "ftypavif", 8) == 0)))
{
DEBUG_1("Using custom heif loader");
image_loader_backend_set_heif(&il->backend);