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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
