sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    SDK: Get Images data

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 954 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Marc477
      last edited by

      In the Sketchup c++ SDK:

      What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data?

      Thank you

      1 Reply Last reply
      Reply Quote 0
      • tt_suT
        tt_su
        last edited by

        Hmm... it looks like this might be missing. I'll double check and file an issue if it's truly missing.

        1 Reply Last reply
        Reply Quote 0
        • M
          Marc477
          last edited by

          Any work around ?

          1 Reply Last reply
          Reply Quote 0
          • tt_suT
            tt_su
            last edited by

            Not that the API provides. You could extract to a temp file and read it.

            1 Reply Last reply
            Reply Quote 0
            • M
              Marc477
              last edited by

              @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.

              1 Reply Last reply
              Reply Quote 0
              • A
                Aerilius
                last edited by

                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.

                1 Reply Last reply
                Reply Quote 0
                • tt_suT
                  tt_su
                  last edited by

                  @marc477 said:

                  What is the equivalent of SUTextureGetImageData for a SUImageRef? How can I access images pixel data?

                  Update - SUImageGetData should be equivalent.
                  http://www.sketchup.com/intl/en/developer/su-api/image_8h.html#aedb99aee21a39619602866fc400766cb

                  1 Reply Last reply
                  Reply Quote 0

                  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 Login
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement