[File] Magic for JPEG XL (*.jxl) files

Ian Tester imroykun at gmail.com
Mon Feb 22 08:10:58 UTC 2021


The format uses Protocol Buffers to store the headers. So nothing more can
be parsed with magic/file?

diff --git magic/Magdir/jpeg magic/Magdir/jpeg
index 52c9ad3..4409c1e 100644
--- magic/Magdir/jpeg
+++ magic/Magdir/jpeg
@@ -124,3 +124,14 @@
 >>4    lelong%2        0       JPEG-XR
 !:mime image/jxr
 !:ext  jxr
+
+# JPEG XL
+0      string          \xff\x0a        JPEG XL codestream
+!:mime  image/jxl
+!:ext jxl
+
+# JPEG XL (transcoded JPEG file)
+0      string          \x00\x00\x00\x0cJXL\x20\x0d\x0a\x87\x0a
JPEG XL container
+!:mime  image/jxl
+!:ext jxl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/file/attachments/20210222/d5642f26/attachment.htm>


More information about the File mailing list