Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to load a 24bpp bmp using C

RatRat Posts: 8Member
I'm able to load 1,4,8bpp bmp files in DOS using C. I'm not able to load 24bpp bmp. I want the details about how to set the palette and put the pixel values for a 24bpp bmp.
Please help me
Thank you

Rat

Comments

  • gautamgautam Posts: 642Member
    I don't think a 24bpp has a palette. From what I know it might just be possible be able to convert a 24bpp to 8bpp. I am not sure though.

    : I'm able to load 1,4,8bpp bmp files in DOS using C. I'm not able to load 24bpp bmp. I want the details about how to set the palette and put the pixel values for a 24bpp bmp.
    : Please help me
    : Thank you
    :
    : Rat
    :

  • RatRat Posts: 8Member
    True. There is no palette values for 24bpp. We have the rgb values. How to set the pixels using that. I donot have any idea about that. Please help me.

    : I don't think a 24bpp has a palette. From what I know it might just be possible be able to convert a 24bpp to 8bpp. I am not sure though.
    :
    : : I'm able to load 1,4,8bpp bmp files in DOS using C. I'm not able to load 24bpp bmp. I want the details about how to set the palette and put the pixel values for a 24bpp bmp.
    : : Please help me
    : : Thank you
    : :
    : : Rat
    : :
    :
    :

  • cosmos_ggcosmos_gg Posts: 5Member
    That's very simple.
    first ,you need switch to a 24bit VESA mode.
    And you will be able to write in a linearly buffer,representating the VRAM. (so,that's an array of bytes like R G B R G B R G etc...
    So get info on the VESA!

    : True. There is no palette values for 24bpp. We have the rgb values. How to set the pixels using that. I donot have any idea about that. Please help me.
    :
    : : I don't think a 24bpp has a palette. From what I know it might just be possible be able to convert a 24bpp to 8bpp. I am not sure though.
    : :
    : : : I'm able to load 1,4,8bpp bmp files in DOS using C. I'm not able to load 24bpp bmp. I want the details about how to set the palette and put the pixel values for a 24bpp bmp.
    : : : Please help me
    : : : Thank you
    : : :
    : : : Rat
    : : :
    : :
    : :
    :
    :

  • RatRat Posts: 8Member
    Thank you. I'm able to do that.
    Regards
    Rat
    : That's very simple.
    : first ,you need switch to a 24bit VESA mode.
    : And you will be able to write in a linearly buffer,representating the VRAM. (so,that's an array of bytes like R G B R G B R G etc...
    : So get info on the VESA!
    :
    : : True. There is no palette values for 24bpp. We have the rgb values. How to set the pixels using that. I donot have any idea about that. Please help me.
    : :
    : : : I don't think a 24bpp has a palette. From what I know it might just be possible be able to convert a 24bpp to 8bpp. I am not sure though.
    : : :
    : : : : I'm able to load 1,4,8bpp bmp files in DOS using C. I'm not able to load 24bpp bmp. I want the details about how to set the palette and put the pixel values for a 24bpp bmp.
    : : : : Please help me
    : : : : Thank you
    : : : :
    : : : : Rat
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :

Sign In or Register to comment.