Look, if you would think about the question, it means exactly what I am saying. It never gets used again; no where in the code is it used after that; ctrl-F, palette, nothing afterwards (3 entries) where it is declared and those two;
And if you don't know what 'applied' means?
well, no where in the code do you set bitmapInfo.bmiColors = palette, for example. WOW, you learned something today. Good Job!
There is nothing else that is related to the palette. So, I expect people to think, and not ask stupid questions when not even I understand. Unlike when I first started, I am pretty capable of finding out what codes to use and why it works or doesn't; your lucky I ask at all. It means that I am confident there is someone who actually thinks things through before asking questions, but no, Im always let down. The other code is irrelevant.
I have been looking over different examples of reading bitmapinfo and displaying the pic, and every example I find never actually used the palette; just read the palette in a for loop or similar to the code below. The palette on some may use it to printf() the rgb colors to the console, but nothing.
When I didnt use the code, already displayed, I got the myprog3.gif.
Then I added the code, already displayed, I got the myprog4.gif. Voila! It Works!
And this is besides the fact that most of the other code I looked at, once you comment out those lines of code that copy the palette from the image; when you run the program; it crashes OR doesn't display an image at all.
Go do some research and come back to me when your actually thinking.
You can start with this one:
http://www.cplusplus.com/files/winbmp.zip
I edited the line from it because I couldn't find any better, and easiest to change around while testing why mine was showing a irregular image.
Code:
bmp.palette =(RGBQUAD*) ((BYTE*)bmp.bitmapInfo + sizeof(BITMAPINFOHEADER));