GetPixel
Monkey Targets Forums/Desktop/GetPixel
| ||
Hello All, I really need help with something, I need a way to do getpixel I want to load a Heightmap from a image.. PLEASE HELP!! Thanks, |
| ||
1. you have to draw the image onto the screen in OnRender(). 2. Then you can use ReadPixels() to copy all Pixels into an array. 3. After this the array will have exactly the dimensions of the image. 4. Now you can use all pixel information as INTEGER values. 5. Finally CLS the screen in OnRender(). |
| ||
Yeh Knew That.. But the problem is having to do that I wish there was a Pixmap module like BlitzMax, but I was able to figure out what was happening with my stuff.. Thanks, |
| ||
you can pack all this in a own class... where is the problem? |
| ||
I had to remove the SetRender() from MiniB3d, do the calculations, then setup the SetRender() after that to get GetPixel to work.. Thanks. |
| ||
Why not write out the file in some other format (run-length encoding or whatever) and read the map in directly as integers? Sounds easier than futzing around with readpixel. |