[
https://issues.apache.org/jira/browse/TIKA-4824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106047#comment-18106047
]
ASF GitHub Bot commented on TIKA-4824:
--------------------------------------
dschmidt commented on PR #3037:
URL: https://github.com/apache/tika/pull/3037#issuecomment-5347205540
Yes, totally - no need to be sorry. As I said: it was meant merely as a
headsup, so it doesn't get blocked until 5.x, if you had considered it breaking
:)
> Extract embedded JPEG previews from TIFF-based raw images (NEF, ARW, PEF,
> DNG, CR2)
> -----------------------------------------------------------------------------------
>
> Key: TIKA-4824
> URL: https://issues.apache.org/jira/browse/TIKA-4824
> Project: Tika
> Issue Type: New Feature
> Reporter: Dominik Schmidt
> Priority: Major
>
> TIFF-based camera raw files embed camera-generated JPEG previews, often at
> full resolution. Tika currently gives no access to them: the x-raw-* types
> are glob-only (not sub-classes of image/tiff), no parser claims them, and
> nothing extracts the preview bytes. For consumers that cannot decode raw
> sensor data, the embedded JPEG is the only practical way to render a raw file
> (analogous to TIKA-4801 for audio cover art).
> The previews are stored in two ways:
> - Nikon NEF/NRW, Sony ARW/SRF/SR2, Pentax PEF/PTX:
> JPEGInterchangeFormat/-Length tags in the IFD chain or in SubIFDs
> - Adobe DNG, Canon CR2: a single JPEG-compressed strip (Compression 6/7)
> Proposal:
> - New RawTiffParser in tika-parser-image-module claiming
> image/x-raw-{nikon,sony,pentax,adobe} and image/x-canon-cr2: TIFF/EXIF/XMP
> metadata via TiffParser, walks the IFD chain plus SubIFDs and emits each
> preview through the EmbeddedDocumentExtractor (image/jpeg, THUMBNAIL);
> configurable via "raw-tiff-parser": {"extractPreviews": false}
> - Strip candidates need a safety rule: raw sensor data in CR2/DNG is lossless
> JPEG and also starts with an SOI marker. Strips are only accepted for
> displayable images (PhotometricInterpretation RGB/YCbCr, or 8 bits per sample
> when it is absent, as in CR2's preview IFD)
> - Make image/x-raw-{nikon,sony,pentax,adobe} sub-classes of image/tiff so
> name+data detection resolves them (they have no reliable magic; data-only
> detection stays image/tiff)
> - Synthetic ~2KB test fixtures mirroring the real IFD layouts, unit and
> detection tests
> Evaluated and excluded: Epson ERF (preview lives in the MakerNote), Olympus
> ORF and Panasonic RW2 (non-standard TIFF magic), Fuji RAF (not TIFF), Canon
> CR3 (ISO-BMFF). Verified against CC0 samples from raw.pixls.us (NEX-6,
> DSC-R1, K-7, EOS 7D, K-x and GR DNGs) plus real Nikon D80/D3000 files.
> PR to follow.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)