sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Create Texture via Ruby or/and win32-api

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 277 Views 2 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.
    • A Offline
      Anton_S
      last edited by

      Hello, I got a bit of interest in creating texture image files via Ruby or/and win32-api, and thus, sincerely NEED your help. It started out with a simple-rays plugin. Simple-Rays basically scans with a simplified raytest, calculates the shading, creates the shading textures, and colors the faces. To me, it was a pretty interesting to discover, that it creates the texture images and uploads them to SU. Of that, tried, figuring out how Simple-Rays creates images, but figured its too hard, and thus need help!

      Want To Know How To:

      • Create the right file for the image "wb" or "wt"
      • Create a bitmap
      • Set color for the certain pixel of the bitmap
      • Write a bitmap into the file
      • Save the file into different modes (.bmp, .jpg, .png, or .jpeg).

      Already Know How To:

      • Upload an image to SU
      • And Use it For my benefit (pretty simple)

      Maybe, there already is some topics for that, but I couldn't find. Url links, and example scripts would help.

      Thankyou

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        FYI... SketchUp uses PaintLib internally.

        It's openSource... see: http://www.paintlib.de/paintlib/
        and the source here: http://sourceforge.net/projects/paintlib/

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          @dan rathbun said:

          FYI... SketchUp uses PaintLib internally.

          It's openSource... see: http://www.paintlib.de/paintlib/
          and the source here: http://sourceforge.net/projects/paintlib/

          Thanks, converting textures to the other formats, sounds good.

          Is there is a reference on how to create a bmp(a simple file mode) file, set the width/height of the image and set the color of the each pixel?

          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