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

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

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

   [TIKA-5032](https://issues.apache.org/jira/browse/TIKA-5032), the 3MF part. 
Draft until #3530 (zip previews) and #3543 (model/3mf) are merged; the branch 
merges both for now and will be rebased onto main then. The change itself is 
the last commit.
   
   A 3MF package names its thumbnail by the OPC thumbnail relationship in 
`_rels/.rels`, and the entry it targets becomes the `THUMBNAIL`, through the 
selector table of #3530. Following the relationship matters: Bambu Studio and 
Creality Print, which write most 3MF files today, name `Metadata/plate_1.png`, 
not `Metadata/thumbnail.png`. A model part may carry a thumbnail relationship 
of its own (`3D/_rels/3dmodel.model.rels`), which is not the package's. 
External targets are ignored, and the relationships part is read up to 1 MB.
   
   Checked against 41 real 3MF files from public repositories (Bambu Studio, 
PrusaSlicer, Creality Print, CAD exporters): the 24 whose relationship targets 
an existing entry yield that image (13 `plate_1.png`, 10 `thumbnail.png`, one 
`Auxiliaries/.thumbnails/thumbnail_3mf.png`); the other 17, without the 
relationship or with a missing target, yield none and no error.
   




> Extract the preview image of zip-based formats (comics, Krita, OpenRaster, 
> Procreate, Sketch, FreeCAD, 3MF)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-5032
>                 URL: https://issues.apache.org/jira/browse/TIKA-5032
>             Project: Tika
>          Issue Type: Improvement
>          Components: mime, parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> These formats are zip containers that carry a ready-made preview at a fixed 
> path:
> * {{.cbz}}: first image in name order
> * {{.kra}}: {{preview.png}}
> * {{.ora}}: {{Thumbnails/thumbnail.png}}
> * {{.procreate}}: {{QuickLook/Thumbnail.png}}
> * {{.sketch}}: {{previews/preview.png}}
> * {{.FCStd}}: {{thumbnails/Thumbnail.png}}
> * {{.3mf}}: {{Metadata/thumbnail.png}}
> Detect them and emit that image as the THUMBNAIL embedded resource, so 
> {{/unpack/preset/thumbnail}} serves it. Several have no media type in 
> tika-mimetypes.xml yet (shared-mime-info has 
> {{application/vnd.comicbook+zip}}, {{application/x-krita}}, 
> {{image/openraster}}). For 3MF see TIKA-5031.



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

Reply via email to