I am writing a renderer in C++. I see that a similar question has been answered, I was just looking for a bit more information. I have a 256 color bitmap that I load into memory and then into OpenGL. I am UNABLE to convert the files before hand and need to do it in memory. I want to be able to convert it to an RGBA bitmap to make use of the alpha channel. Does anyone have any code or suggestions about libraries that may help me with this?
Share
I have some code somewhere, but it’s just 20 lines or less. The BMP format is pretty simple, just read the header, then read every color, which serves as an index in the palette array. And keep in mind that BMPs are upside down: