Pages

Ruby To Extract PNG Thumbnail From SKP

I am nearing completion of have posted some pure Ruby code that extracts the png thumbnail image from the SKP file. Did you know each .skp file has the thumbnail image embedded in it? That's what Windows Explorer uses to thumbnail .skp files.

SketchUp does not need to be running to extract the thumbnail, only the .skp file is needed.

This means what? If you host a model site, you don't need to manually load every model to generate a thumbnail - it can be automated. It can be used to create an index to your model files, or create web pages using the images. It can be used to create on-the-fly image galleries - and stuff like that.

The extracted png's are 128 pixels wide and about 70 pixels high, although the height varies for some reason.

It's command-line only right now, which is good enough for me.

extract_png.rb

1 comment:

  1. hi I get this message. extract_png.rb: Permission denied in Terminal.
    I touched the permission but it still not working.
    some help?
    thanx

    ReplyDelete