• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

SDK: Get Images data

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 3 Posters 666 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 Offline
    Marc477
    last edited by 24 Jun 2014, 16:57

    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
    • T Offline
      tt_su
      last edited by 25 Jun 2014, 10:36

      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 Offline
        Marc477
        last edited by 1 Jul 2014, 22:42

        Any work around ?

        1 Reply Last reply Reply Quote 0
        • T Offline
          tt_su
          last edited by 2 Jul 2014, 08:43

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

          1 Reply Last reply Reply Quote 0
          • M Offline
            Marc477
            last edited by 3 Jul 2014, 17:26

            @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 Offline
              Aerilius
              last edited by 3 Jul 2014, 20:17

              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
              • T Offline
                tt_su
                last edited by 13 Apr 2015, 15:10

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

                Advertisement