Getting compressed texture data


Dear all,

When texture images are stored in a SKP files, I suppose that they are stored in a standard compressed format. Does SketchUp keeps the original data and directly stores the raw image bytes, without doing decompression/recompression?

Regarding the SUTextureWriteToFile function, does it recompress the image according to the file extension passed in the file name, or does it just copy raw image bytes to a new file?

I am writing a converter for reading a full SKP model and send it to a renderer. With the API, I can write an image file using SUTextureWriteToFile, get the uncompressed RGB data with SUTextureGetImageData, but is it possible to retrieve the compressed image directly to a buffer, without losing time and quality on decompression/recompression, and without using a temporary file?



Hello @galinette,

When using SUTextureWriteToFile, if you are saving the image in the same file format, we do not recompress the data; otherwise we have to.

Unfortunately, we do not expose the compressed image data through the API.

Hope that helps,



This would be a nice feature to have in the API.