I've been playing with OpenGL for a while now, but I have never completely understood the image loading process. From what I understand images are loaded into an array of pixels for display. I don't know how that data is stored.

I've been trying to come up with a way to have the top left pixel of a BMP be the transparency color for the whole image. So I thought to myself, this is easy enough, all I have to do is record the top left pixel value and find each pixel of the same color and set it to a transparency.

But so far I do not understand how to do that, it seems so simple but for some reason I do not even know where to start.

input.close();
return new Image(pixels2.release(), width, height);
}
Would I just check during the reading process, then set a corresponding "alpha byte(s)"?

EDIT:
I've been playing around with this and I haven't been able to get anything to work. I allocate enough room for a 32 bit BMP, load in the 24 bit BMP, then as a test I set the 4th set to an alpha value and I cannot even tell if it is my code or the transparency code that isn't working. Here is the read in stuff:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
//...
glDisable(GL_BLEND);
But no matter what I set the glColor4f before the drawing calls or set the alpha bits to a value all I get is a black screen. If I comment out the blend call I can see my all of the stuff on the screen and the texture is correctly applied, but there isn't any transparency...