Getting RGBA pixel value from images

Hi all,

Is possible in JME get the value of a single pixel locating it from an image loaded as texture?

What i need is like a color piker, to set fog and light color from the sky color (width/2, height) point.

Is possibile or i need to use awt DirectColorModel?

we are trying in this way:



As long as you're using a client side created texture (like when loading a file) and it's data is in RBG format (also like when loading most file types, but keep in mind some might load RGBA) this is a good method. The problem with making a method from it (in com.jme.image.Image) is that Image can contain data in many different formats too, so it'd be a bit more work than you think. However, with just a little check in the method to see if the image is RGB or RGBA (since that seems to cover most cases) it could work.



I'd make it right now (it's not that much work) if I wasn't so busy already, of course contributions are welcome too.