From cd3688ae7c61f9170892ccfec96c3355e4941143 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Thu, 12 Aug 2021 10:15:55 +0100 Subject: [PATCH] Fix #915: Unable to view JXL code streams https://github.com/BestImageViewer/geeqie/issues/915 Use FF0A as an additional magic number for JPEG XL files. --- src/image-load.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/image-load.c b/src/image-load.c index 74c3ca98..0b164577 100644 --- a/src/image-load.c +++ b/src/image-load.c @@ -827,6 +827,13 @@ static void image_loader_setup_loader(ImageLoader *il) image_loader_backend_set_jpegxl(&il->backend); } else + if (il->bytes_total >= 2 && + (memcmp(il->mapped_file, "\xFF\x0A", 2) == 0)) + { + DEBUG_1("Using custom jpeg xl loader"); + image_loader_backend_set_jpegxl(&il->backend); + } + else #endif if (il->fd->format_class == FORMAT_CLASS_COLLECTION) { -- 2.20.1