Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

24 bit bitmap

Developers
2008-12-02
2013-05-02
  • whitewaterbug
    whitewaterbug
    2008-12-02

    The code we are trying is:

    ILuint ImgId;
    ilGenImages(1, &ImgId);
    ilBindImage(ImgId);
    ilLoadL(IL_JPG, DataJpg, JpgSize);
    ilSaveL(IL_BMP, DataBmp, BmpSize);

    This creates the bitmap but the bitmap isn't 24 bits.  Is there an option to force 24bits?

     
    • Denton Woods
      Denton Woods
      2008-12-27

      You should be able to try:

      ilConvertImage(IL_RGB, IL_UNSIGNED_BYTE);

      before you save.

      To avoid having to do that everytime you save, you can use this once before you load any images:

      ilEnable(IL_FORMAT_SET);
      ilSetInteger(IL_FORMAT_MODE, IL_RGB);