Yes, this is possible and infact has been done already,
the script to do this comes bundled with Blender: see blender-thumbnailer.py.
This Python script runs without Blender, eg extracting a PNG image from my.blend
:
blender-thumbnailer.py /input/my.blend /output/thumb.png
Details
To extract the thumbnail from a .blend
file you have to writeuse a basic .blend
file parser, however - this is written in such a way that its quite simple to extract the data without having to understand the entire blend file format, instead - you only need to read one of the serialized BHead
blocks. (See link above).
Using blender-thumbnailer.py
as a reference: writing this in another programming language, or saving as a different image format should not be a very big task.