diff options
author | Alistair <alistair7@users.noreply.github.com> | 2021-06-09 19:00:25 +0100 |
---|---|---|
committer | Daniel Friesel <derf@chaosdorf.de> | 2021-06-09 20:31:00 +0200 |
commit | bc372c8faddd396b2d07470139b62290f499881f (patch) | |
tree | ef59cbf504496d003c5a23385944a324ca974a4d /src/imlib.c | |
parent | b33f6b83bcbe69b5d9285c6be4e838bbc0ebcce1 (diff) |
Add JPEG XL to supported file formats
Note that Imlib2 does not support JXL images out of the box. However, the
imlib2-jxl loader (https://github.com/alistair7/imlib2-jxl) does.
Diffstat (limited to 'src/imlib.c')
-rw-r--r-- | src/imlib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c index fc81bdd..3a7cb6d 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -312,6 +312,11 @@ int feh_is_image(feh_file * file) // imlib2 releases do not support heic/heif images as of 2021-01. return 1; } + if ((buf[0] == 0xff && buf[1] == 0x0a) || !memcmp(buf, "\x00\x00\x00\x0cJXL \x0d\x0a\x87\x0a", 12)) { + // JXL - note that this is only supported in imlib2-jxl. Ordinary + // imlib2 releases do not support JXL images as of 2021-06. + return 1; + } buf[15] = 0; if (strstr((char *)buf, "XPM")) { // XPM |