Thread: Color table help!! Asaap! Plss

  1. #1
    Registered User
    Join Date
    Feb 2016
    Posts
    9

    Color table help!! Asaap! Plss

    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??

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    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?

  3. #3
    Registered User
    Join Date
    Feb 2016
    Posts
    9
    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

  4. #4
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    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?

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Y717 View Post
    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
    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?

  6. #6
    Registered User
    Join Date
    Feb 2016
    Posts
    9
    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

  7. #7
    Registered User
    Join Date
    Feb 2016
    Posts
    9
    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.
    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.

    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.

  8. #8
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    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?

  9. #9
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    I guess it wasn't so important after all.

  10. #10
    Registered User taazz's Avatar
    Join Date
    May 2016
    Posts
    50
    Quote Originally Posted by Y717 View Post
    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??
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Structure Pointer Problem! Help Plss! :D
    By nosyaj in forum C Programming
    Replies: 6
    Last Post: 04-05-2011, 03:56 AM
  2. help plss.
    By no1canbeat in forum C Programming
    Replies: 2
    Last Post: 10-06-2010, 10:12 AM
  3. PLss HeLpppppp
    By MoraL in forum C Programming
    Replies: 5
    Last Post: 05-30-2008, 09:23 AM
  4. plss help
    By raja9911 in forum C Programming
    Replies: 13
    Last Post: 01-28-2006, 02:00 PM
  5. static text color/background color
    By braindude in forum C++ Programming
    Replies: 1
    Last Post: 07-06-2003, 05:58 AM

Tags for this Thread