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

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

dschmidt commented on PR #3535:
URL: https://github.com/apache/tika/pull/3535#issuecomment-6669538731

   Thanks, all addressed in the last commit.
   
   1. `@TikaComponent(name = "cr3-parser")`, the name the parser resolves its 
`ImageMetadataConfig` under.
   2. `supported-formats.adoc` is regenerated with `Cr3Parser` / 
`image/x-canon-cr3`; `testSupportedFormatsPartialIsCurrent` passes.
   3. The previews get generated resource names like RawTiffParser's: 
`thumbnail-0.jpg` for the PRVW preview, `image-0.jpg` for the THMB one.
   4. The test now uses `prvw.length + 10`, which runs into mdat; with the box 
check removed it fails, so it tests what it says.
   - The test file now has a CMT3 block with a Canon maker note tag (firmware 
version), checked in the output.
   - `Cr3AutoDetectTest` in the integration tests parses a minimal CR3 with the 
full AutoDetectParser and checks that Cr3Parser handles it and the preview 
comes out as the thumbnail.
   
   The 14 real files still give the same metadata, now with the resource names. 
They're CC0 from raw.pixls.us, but 10 to 60 MB each, so the tests keep building 
their own file.
   




> Canon CR3: emit the embedded JPEG preview as THUMBNAIL
> ------------------------------------------------------
>
>                 Key: TIKA-5042
>                 URL: https://issues.apache.org/jira/browse/TIKA-5042
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> CR3 files are detected as {{image/x-canon-cr3}} (TIKA-3991), but unlike the 
> TIFF-based raws (TIKA-4824, TIKA-4980) they yield no preview: CR3 is an ISO 
> base media file, so MP4Parser reads it and emits nothing, and 
> {{/unpack/preset/thumbnail}} answers 204.
> The previews are in Canon {{uuid}} boxes:
> * a JPEG preview of 1620x1080 in the top-level {{uuid}} box 
> {{eaf42b5e-1c98-4b88-b9fb-b7dc406e4d16}}, as a {{PRVW}} record (the JPEG 
> starts 20 bytes after the {{PRVW}} tag)
> * a 160x120 JPEG thumbnail ({{THMB}}) inside the {{uuid}} box 
> {{85c0b687-820f-11e0-8111-f4ce462b6a48}} in {{moov}}
> Emitting the {{PRVW}} JPEG as {{THUMBNAIL}} (and {{THMB}} as {{INLINE}}, as 
> the TIFF-based raws do with smaller previews) would give CR3 a preview. 
> Checked with the CC0 sample "Canon - EOS R6 - 3:2.CR3" from raw.pixls.us.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to