You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Nick Burch (Jira)" <ji...@apache.org> on 2021/05/21 09:58:00 UTC

[jira] [Commented] (TIKA-3411) Add image/jxl

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

Nick Burch commented on TIKA-3411:
----------------------------------

The 10 byte magic should be fine, even though it's mostly text the nulls at the start ought to guard for that:

'\x00', '\x00', '\x00', '\x0c', 'J', 'X', 'L', ' ', '\r', '\n', '\x87', '\n'

 

The 2 byte version looks problematic, that doesn't seem very unique and feels like it might get triggered by quite a lot of things (including a text file with a broken BOM that starts with a blank line)

I'd be tempted to add the entry with the extension and the longer magic, but not add the short one to avoid false-positive matches. Would that seem reasonable to you as a user of Tika?

> 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)