Create Texture via Ruby or/and win32-api
-
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
-
FYI... SketchUp uses PaintLib internally.
It's openSource... see: http://www.paintlib.de/paintlib/
and the source here: http://sourceforge.net/projects/paintlib/ -
@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?
Advertisement