dschmidt opened a new pull request, #3535: URL: https://github.com/apache/tika/pull/3535
CR3 files are detected as `image/x-canon-cr3` but yield no preview: CR3 is built on the ISO base media file format, the type is a sub-type of `video/quicktime`, so MP4Parser reads it and passes over the Canon boxes, and `/unpack/preset/thumbnail` answers 204. The previews sit in two Canon `uuid` boxes. `CanonCr3Previews` reads them when the box handler meets them: - `eaf42b5e-1c98-4b88-b9fb-b7dc406e4d16` at the top level holds, after eight bytes, a `PRVW` record with the large JPEG preview (1620x1080 on current bodies): emitted as `THUMBNAIL`. - `85c0b687-820f-11e0-8111-f4ce462b6a48` in `moov` holds a `THMB` record with a 160x120 JPEG among its child boxes: emitted as `INLINE`, as the TIFF-based raws do with their smaller previews. Both records give width, height and the JPEG length ahead of the JPEG; a length beyond the box or data that is not a JPEG emits nothing. `TikaMp4BoxHandler` now accepts `uuid` boxes and hands every other `uuid` box to the base handler as before. The metadata MP4Parser extracts from CR3 is unchanged. Since CR3 is a still image format, a parser of its own in the image module (as for HEIF) would place it better; this change keeps to the reader CR3 already goes through. Tests: a CR3 built in the test with the box layout of a real file, for the types, the exact JPEG bytes and an oversized length. Also checked by hand against 14 CC0 samples from raw.pixls.us from 11 bodies (EOS M50, M200, 250D, 90D, R3, R5, R5 Mark II, R6, R6 Mark III, R7, R50, R100, 1D X Mark III, PowerShot G7 X Mark III; RAW and C-RAW): no preview before, the 1620x1080 preview as `THUMBNAIL` now, and the same 17 metadata keys as before. https://issues.apache.org/jira/browse/TIKA-5042 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
