[ 
https://issues.apache.org/jira/browse/TIKA-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17349478#comment-17349478
 ] 

Jon Sneyers commented on TIKA-3411:
-----------------------------------

Great, it would be very useful information to know what kind of false matches 
0xFF0A results in!

It would be reasonable in the bytes+filename case to try to differentiate 
multiple plausible options for 0xFF0A based on the extension.

I cannot give any longer magic for this "compact header" 0xFF0A case, from the 
third byte onward it can be basically anything. There are interesting JPEG XL 
images with a total filesize smaller than 50 bytes (check e.g. 
[https://twitter.com/hashtag/jxlart),] which is possible because the header 
overhead has been designed to be minimal. The bitstream of JPEG XL has been 
finalized so it's too late now to change that, but it would be very interesting 
to know if there are any existing file formats that could be confused with jxl.

> Add image/jxl
> -------------
>
>                 Key: TIKA-3411
>                 URL: https://issues.apache.org/jira/browse/TIKA-3411
>             Project: Tika
>          Issue Type: Wish
>          Components: mime
>            Reporter: Jon Sneyers
>            Priority: Major
>
> image/jxl is the media type for JPEG XL (ISO/IEC 18181).
> Conventional filename extension is .jxl
> It is quite straightforward to detect based on magic: there are two possible 
> header bytes:
> {{FF 0A}} 
> or
>  {{00 00 00 0C 4A 58 4C 20 0D 0A 87 0A}}
> {{}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to