i did OpenGL for a class about a year ago, in fact i did something related to this very question i have--i wish i saved my code.

i want to write a small program using OpenGL to open an image file (jpg or gif), and then to read in all the pixels and get their RGB values.

can someone provide some sample code, or a reference to some related site? i searched and searched but didnt find OpenGL image processing examples.