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

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

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

   [TIKA-5036](https://issues.apache.org/jira/browse/TIKA-5036), SketchUp part 
(Blender is #3539).
   
   SketchUp stores a PNG preview in every `.skp` file. `SketchUpParser` (cad 
module) emits it as the `THUMBNAIL`. The file starts with "SketchUp Model" and 
the version as length-prefixed UTF-16 strings; after that, the preview sits in 
one of two places:
   
   - up to SketchUp 2020, in a `CDib` record about 2 KB into the file: the 
record's length fields, then the PNG;
   - from SketchUp 2021, in a zip that starts a few bytes after the version. 
Its `meta/model_thumbnail.png` shows the model alone on a transparent 
background and is taken; `meta/preview_thumbnail.png` (the view with background 
and axes) is the fallback, as some files lack it.
   
   `application/vnd.sketchup.skp` is new, detected by the header. No SketchUp 
type is registered anywhere; this is the one file(1) has used since 2018 for 
the same header.
   
   Checked against 107 real files from public repositories, SketchUp 3 to 2026: 
all are detected, with and without a file name, and each thumbnail matches, 
byte for byte, the PNG an independent extraction finds.
   
   An open question on the `*.skp` glob: Tika maps it to `application/vnd.koan` 
(SSEYO Koan), as IANA does, and two types cannot share a glob. This PR leaves 
it there, so a SketchUp file is recognized by its content, and a `.skp` without 
the header is still Koan. Moving the glob to SketchUp, keeping it with Koan, or 
something else entirely: I don't have a strong opinion and would go with 
whatever you prefer.
   




> Blender and SketchUp: emit the embedded preview
> -----------------------------------------------
>
>                 Key: TIKA-5036
>                 URL: https://issues.apache.org/jira/browse/TIKA-5036
>             Project: Tika
>          Issue Type: Improvement
>          Components: mime, parser
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> {{.blend}} files carry a {{TEST}} block with an RGBA preview, {{.skp}} files 
> an embedded PNG. Emitting it as THUMBNAIL gives both a preview.
> Both need media types first, see TIKA-3992. Note that {{.skp}} is registered 
> as {{application/vnd.koan}} (SSEYO Koan), which SketchUp files collide with.



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

Reply via email to