read pixels of images

i have to access pixel color values of images. what is the best way of doing this?

i searched the forum and learned that this isn’t possible yet but maybe i didn’t understand this correctly.

isn’t there a way/workaround to do this with BGL? if this image browser script can draw images then there should also be a way to read pixels of an image? maybe by reading the pixels from the framebuffer but this wouldn’t be very elegant?

No Blender specific way yet. I am crossing my fingers for Blender 2.37 to have this. Right now you have to write your own image loading code, or use PIL.

If you have gimp(or any other img editing program), the color picker ( the eyedropper) will show you the rgba value of any pixel you click on…

so will clicking on it [in the render window… not for loaded images]

but in python, it doesn’t look like there is a way to get that stuff:
http://www.blender.org/modules/documentation/236PythonDoc/Image.Image-class.html

oops sorry, completely misunderstood the question- thought I was in blender general…

but you can load an image into opengl’s texture memory. once it is there can’t you access it with a buffer somehow?

i think an ugly workaround would be to draw the image and then fetch the pixels from the framebuffer with glreadpixels?