SDK: Get Images data
-
In the Sketchup c++ SDK:
What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data?
Thank you
-
Hmm... it looks like this might be missing. I'll double check and file an issue if it's truly missing.
-
Any work around ?
-
Not that the API provides. You could extract to a temp file and read it.
-
@tt_su said:
Not that the API provides. You could extract to a temp file and read it.
I'm not sure how I am supposed to extract the image to a file, if I cannot read its data.
-
There are no methods to read (or modify) individual pixels, but you can export a material's texture image using
Sketchup::TextureWriter.
Create a temporary group (so the material doesn't have any distortion), apply the texture and load it to the texture writer. -
@marc477 said:
What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data?
Update -
SUImageGetDatashould be equivalent.
http://www.sketchup.com/intl/en/developer/su-api/image_8h.html#aedb99aee21a39619602866fc400766cb
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement