Image buffers not possible right?

Monkey Targets Forums/Android/Image buffers not possible right?

Supertino(Posted 2012) [#1]
Hi all, as I tend to miss the obvious i.e grabimage - I just want to be sure that even though we now have read/write pixel we're only able to read/write the screen and not buffers (like in Blitz) or images?

Say I have these two images, the image I want drawn on screen is image 2 but I want to check if the mouse pointer is over the image by reading the pixel and looking for 255,0,255 on the image 1.

Is this possible?

Image 1


Image 2



AdamRedwoods(Posted 2012) [#2]
you could read the image into a buffer or array (prebuffer), and then check the box overlap for image2, but when the mousexy is in the box, convert that to local box coordinates for the buffer.


Supertino(Posted 2012) [#3]
@Adam could you elaborate a little more? Are you saying to save the image pixel by pixel into an array? hum, could work but would it be slow for doing this for the whole screen? 1280x800?


therevills(Posted 2012) [#4]
Have a look here: http://www.monkeycoder.co.nz/Community/posts.php?topic=3488


Supertino(Posted 2012) [#5]
@therevills - that look interesting, thanks I'll take a look when I get home.