Reading SKP thumbnail
-
Hi,
I have made a search but haven't found a solution yet.
Does someone know a way to read a thumbnail stored in SKP file?
If SU Team could give us info on where we can find its location and a size, that would be enoughTomasz
-
I also thought that tbd wrote a thumbnail extract utility, a long time ago.
-
IF SketchUp is loaded, you can generate an image file for any skp file using:
Sketchup::save_thumbnailIf not, the thumbnail should be in the normal place and size required by Windows, so popular graphic utilities (like ImageMajik,) or C function calls can retrieve it.
Checking the code snippets index, we have:
[ cod e] extract png thumbnail image from .skp file
... which has both outside and inside SketchUp examples. -
Thanks! I have checked 3 or more pages with search result, but didn't find the snippets post. I will be checking it first now.
I want extract them directly from files, without opening them in SU.
Jim's extract_png.rb looks like a good solution. -
@tomasz said:
I want extract them directly from files, without opening them in SU.
Jim's extract_png.rb looks like a good solution.You do not need to open the file(s) using:
Sketchup::save_thumbnail
.. just that you must use it from within SketchUp Ruby. -
@dan rathbun said:
You do not need to open the file(s) using:
Sketchup::save_thumbnail
.. just that you must use it from within SketchUp Ruby.Right, I didn't realize that there is a path parameter in this method!
-
blink -- me neither! I guess I always just skipped over that method...
Advertisement