[
https://issues.apache.org/jira/browse/TIKA-4851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109383#comment-18109383
]
ASF GitHub Bot commented on TIKA-4851:
--------------------------------------
dschmidt opened a new pull request, #3091:
URL: https://github.com/apache/tika/pull/3091
Every JPEG preview used to be a THUMBNAIL in IFD order, so for formats that
store the camera's small thumbnail ahead of the full-size preview (PEF) the
first THUMBNAIL was the smallest one. Now the largest preview (by JPEG length,
a reliable proxy for its dimensions) is emitted first as `thumbnail-0.jpg` with
type THUMBNAIL and the smaller ones follow as INLINE `image-N.jpg`. The PEF
fixture covers the reordering.
https://issues.apache.org/jira/browse/TIKA-4851
> RawTiffParser: mark only the largest JPEG preview as THUMBNAIL
> --------------------------------------------------------------
>
> Key: TIKA-4851
> URL: https://issues.apache.org/jira/browse/TIKA-4851
> Project: Tika
> Issue Type: New Feature
> Reporter: Dominik Schmidt
> Priority: Major
>
> RawTiffParser (TIKA-4824) emits every JPEG preview found in the IFD chain and
> SubIFDs as an embedded document with tk:embedded-resource-type=THUMBNAIL, in
> IFD walk order. A NEF typically carries a 160x120 thumbnail in IFD0 and a
> full-size preview in a SubIFD, DNG and CR2 similar, so the first THUMBNAIL is
> usually the smallest one. A client that wants the representative image has to
> parse the dimensions of every preview and pick the largest, which is a
> format-specific special case again; every other parser that emits THUMBNAIL
> emits exactly one.
> Proposal:
> - Only the largest preview (by JPEG byte length, or by the IFD's
> ImageWidth/ImageLength when present) is marked THUMBNAIL and emitted first.
> - The remaining previews are still extracted, marked INLINE (they are
> renderings of the same image, not attachments), keeping the current
> thumbnail_N generated names or switching the smaller ones to an image_N
> prefix.
> Motivation for both tickets: a generic "first THUMBNAIL is the preview" rule
> across all formats in a downstream consumer (OpenCloud's Tika extractor).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)