Embedded png larger than 128x128?
-
I've done a bit of searching, and found that the embedded png for skp files is max 128x128. However, when I save a file from the 3D warehouse, the file has a much larger icon, with a max dimension of 400 (until I make a change). Is there a way to have a larger icon for the skp file?
My setup: Sketchup 8.0.11752, Windows 7 64-bit, Mystic Thumbs 2.7.8.
-
I thought thumbnail from all skps (including from 3D Warehouse) is maximum 128px. The preview images in the website of 3D Warehouse are not the embedded thumbnail, but 2d exports that are created by SketchUp during the upload process (400300px, although 3D Warehouse allows theoretically 500300).
SketchUp does produce the embedded thumbnails as they are, and this can't be changed by a setting or similar. I've thought several times whether one could build something that circumvents this. (Much) Bigger embedded thumbnails are probably not desired as they increase the filesize. An idea would be to export a 2d image everytime a file is saved, and store that image in the thumbnail folder.
-
The larger 400 pixel wide icon isn't just on the website, but attached to the skp file even after its downloaded. I can clear the thumbnail cache, and when Mystic Thumbs rebuilds it, I get the larger icon on the downloaded skp file (until I edit it and Sketchup regenerates the 128p png). Is there a way to attach the 2d export to a skp file without uploading it? As a sample, I took a file I made, uploaded it to the 3D Warehouse and then downloaded it back to my computer. The icon is now 400x361 wide, but I don't wish to do that all the time just to get a bigger icon.
-
I've now done a byte-wise comparison of the before and after skp files from the previous post. The PNG files are near the beginning of the SKP file. In fact, there are two of them in each skp file, both the same size as the icon (400x361 for the uploaded then downloaded skp, 128x115 for the original). So, a fix seems possible if improbable.
-
I actually generate my thumbnails by extracting them this way (but I don't understand much of the bytes), it's only 90% of times successful. I thought about doing the reverse (embedding a bigger thumbnail) but I don't want to risk corrupting the file.
Jim has a script (but download link broken). Check out:
http://sketchuptips.blogspot.de/2008/01/ruby-to-extract-png-thumbnail-from-skp.html
http://forums.sketchucation.com/viewtopic.php?f=79&t=37948&p=336114
This is the script that I made:
https://sites.google.com/site/sketchupsage/sages/files/aerilius/sketchup.thumbnailer?attredirects=0
We could even create 2d exports with an onPreSaveModel observer.I know OS X users would be keen on such thumbnails (or big quickview previews), but I have no idea if they are ok with fiddling with scripts.
-
I have something working!
I get large previews for SketchUp files.
If someone is interested or knows how to get it work for Windows, I can share the code (it is not much). I looked into IThumbnailProvider interface, but that's too complicated for me and it probably requires a C extension or something.
Advertisement