Accessing low level image data

Hi

I’m wondering how (if at all) it is possible to access low-level image data for a JME Image, similar to the sort of info I can get from an AWT buffered image using Raster and ColorModel - for example whether the image has an alpha channel, and querying RGBA values of individual pixels.

Everywhere I can see this sort of stuff being done in the jme examples, the code converts the jme Image to an awt BufferedImage, works with that, then converts it back. This seems inefficient, and I was hoping there might be a more direct way to do it. Or are such details only determinable by the time the image gets to into the GPU?

Thanks
Barney

http://hub.jmonkeyengine.org/javadoc/com/jme3/texture/image/ImageRaster.html

Hi

Ah, great. And I think I can get the ColorModel-style stuff from ImageCodec.lookup(Format).

Thanks

> And I think I can get the ColorModel-style stuff from ImageCodec.lookup(Format).

… if it weren’t package-private :frowning: A bit of sneaky reflection might be required.