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

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

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

   [TIKA-5036](https://issues.apache.org/jira/browse/TIKA-5036), Blender part 
(SketchUp follows separately).
   
   Blender stores a preview of the scene in every `.blend` file it saves with a 
UI: a 128 px RGBA bitmap in the `TEST` block, right after `REND`. 
`BlenderParser` (cad module) emits it as a PNG `THUMBNAIL`. Both block header 
layouts are read, the old one and the 64-bit one of Blender 5.0.
   
   `application/x-blender` is new, with the globs and magic of 
shared-mime-info. Blender can save gzip- (up to 2.9x) or zstd-compressed (3.0 
and later) files, which their magic would make `application/gzip` or 
`application/zstd`. `BlenderDetector` looks for `BLENDER` behind the 
compression, as `GZipSpecializationDetector` does for WARC. zstd needs zstd-jni 
on the classpath, optional as it is for `CompressorParser`; without it a 
zstd-compressed file stays `application/zstd`, and a test hides zstd-jni from a 
class loader to cover that.
   
   Checked against 41 real files from public repositories: 19 from Blender 2.77 
to 4.2 (plain, gzip, zstd) and 22 from Blender 5.0 to 5.2. All are detected 
with and without a file name, and every preview they hold comes out upright. 
Files saved without a UI (`blender -b`) have no preview; files saved by scripts 
keep the one they were opened with.
   




> 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