How do I create a color table for a bmp file? I know I'm supposed to put it after the file header and information header and before the actual image data
But WHAT do I put exactly??
How do I create a color table for a bmp file? I know I'm supposed to put it after the file header and information header and before the actual image data
But WHAT do I put exactly??
Have you tried using google to find information about the format of a BMP file? Also, what makes you think saying "asap" will motivate anyone other than you?
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
I did try using google and I didn't understand it so that's why I asked here.
PS im trying to convert 24bit to 8bit grayscale.
I just didn't understand what they mean by putting 0x00 up to 0xFF. Because I did that and the resulting image was a blank canvas.
Also I wasn't thinking of motivating people using asap. I just said it because I actually do need to figure this as soon as possible and to convey that whoever helps as soon as they can will be greatly appreciated. That's the meaning of asap isn't it
Do you understand what 0x00 and 0xFF represent?
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
You need to understand that your sense of urgency is yours, and yours alone. Trying to use that urgency to motivate others, who provide help on this forum in their own spare time, is often perceived as selfish, as if your problem is more important than what others are doing.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
Yes, that's the 256 colors that grey-scale uses, right?
Which should be in my color table (That's what i understood)
so i set the number of colors to 256
and then after that, i wrote 0x00 to 0xFF in my file after the infos but before the image data. But it didn't work
Again, I did not say asap for such reason. I completely understand that my urgency is mine alone. I also understand that people who arehere are not required to answer me right away when I say 'I need too now...how do i...?'. I just wished to express that I actually need to know this stuff quite soon and it's important to me. And because it's important to me, anyone available who would notice my urgency and be willing to help is very much appreciated. Just because I want it to be known that it's important to me doesn't mean I undermine the importance of whatever other people might be doing this moment.You need to understand that your sense of urgency is yours, and yours alone. Trying to use that urgency to motivate others, who provide help on this forum in their own spare time, is often perceived as selfish, as if your problem is more important than what others are doing.
Me saying asap is not equivalent to me saying you HAVE to help me. That's why I said please.
But if you took it that way, then look sorry. I'm not obligating anyone here. I'm just asking for help.
Care to share your code, so we can actually identify your problem? Be sure to enclose it in [CODE][/CODE] tags.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
I guess it wasn't so important after all.
a 256 colour palette is an array of 256 32bit integers for each color. The format of a single cell is 0x00BBGGRR where BB is the byte that holds the blue value of the color, GG the green and RR the red. In little endian CPUs this will be written as 0x00RRGGBB in the file. Well I guess I misplaced a byte or two so test it out for your self to find the correct order.