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

ASF GitHub Bot commented on TIKA-4870:
--------------------------------------

dschmidt opened a new pull request, #3116:
URL: https://github.com/apache/tika/pull/3116

   AVIF reached no parser. `HeifParser` claims `image/heif`, 
`image/heif-sequence`, `image/heic` and `image/heic-sequence`, nothing else in 
tika-parsers claims `image/avif`, and its mime entry declares no 
`sub-class-of`, so an AVIF was detected and then handed to no one: no 
dimensions, no EXIF, no XMP. Detection was added in TIKA-3193 back in 2020 and 
nothing picked it up since.
   
   It is the same ISO-BMFF container and the metadata sits in the same boxes, 
so adding the type is the whole change. What comes out of the fixture: 
`image/avif`, the brands, 32x32 from the `ispe`, and the XMP that `HeifXmp` 
locates through `meta`/`iinf`/`iloc`, the same path HEIC takes.
   
   The fixture is a 32x32 gradient encoded with libavif through ImageMagick, 
with an XMP packet attached, 1 KB.
   
   Two things this does not touch. Animated AVIF still detects as 
`video/quicktime`, which is TIKA-4509 and is a question about the media type 
name rather than about parsing. And the AVIF motion photo case from TIKA-4869 
needs #3115 as well, so its fixture and test follow whichever of the two lands 
second; I have verified locally that the two together emit the video from the 
trailing `mpvd` box as expected.
   
   https://issues.apache.org/jira/browse/TIKA-4870
   




> HeifParser should accept image/avif
> -----------------------------------
>
>                 Key: TIKA-4870
>                 URL: https://issues.apache.org/jira/browse/TIKA-4870
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> AVIF files reach no parser today. HeifParser claims image/heif, 
> image/heif-sequence, image/heic and image/heic-sequence, nothing else in 
> tika-parsers claims image/avif, and its mime entry declares no sub-class-of 
> image/heif, so an AVIF is detected and then handed to no one: no dimensions, 
> no EXIF, no XMP. Detection was added in TIKA-3193 and nothing ever picked it 
> up for parsing.
> The container is the same ISO-BMFF and the metadata sits in the same places. 
> HeifXmp locates XMP generically through meta/iinf/iloc, which is where AVIF 
> puts it as well, and metadata-extractor reads HEIF item properties for AVIF 
> too, so adding MediaType.image("avif") to the parser's supported types is 
> most of the work; what it needs is a fixture and a check of which properties 
> actually come out.
> Once that is in, the Motion Photo work from TIKA-4869 should be checked 
> against it: AVIF is one of the three primary image formats the Motion Photo 
> format allows, alongside JPEG and HEIC, and its video sits in the same 
> trailing mpvd box, so the same code should emit it. There is no test for that 
> today.
> Detection of animated AVIF is a separate question and is tracked in TIKA-4509.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to