Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: bakedjake
In the COM world it's IExtractImage - wondering if it can be done on Linux...
In Microsoft Office files there's an option in File -> Properties to 'Save Preview Picture' which creates a small bitmap that can be seen in Windows explorer when in the Thumbnail view mode.
If anyone has any possible pointers/ideas I'd greatly appreciate it. (COM-C++ bridge/ImageMagick/wvWare something!)
Thanks in advance,
Typically when a client sends me an MS Word .doc file with images embedded in it, I use StarOffice to open the file, then save it in another format that I can use.
Most standard boxed Linux versions (e.g. SuSE or RedHat) come with StarOffice, so dig around in your desktop menus or pull up an xterm and type in the command line: soffice &
You might get lucky and have it.
I have had StarOffice reject some versions of MS Word docs, but if you can open it, try saving the file as an HTML file. The actual .html file that it saves is not exactly the cleanest code in the world (to put it mildly) but you will find that all of the embedded images from the .doc are now saved as .jpg files in the same directory path where you saved the .html file.
The above post is made under the assumption that you have some sort of boxed Linux install, so if you have further problems, make sure you post your Linux version...
After that, just unzip the file:
You'll find a new directory created called Thumbnails, in which is the .png thumbnail you want.
Of course it is possible to automate this much more than I've discussed, including pulling the thumbnail directly from the zip without expanding it all.