FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


C++ code problem





riyadh
can anyone tell me what the code for a 32-bit bitmap will be in Dev C++. the code for an 8-bit bitmap is:
Code:
struct BITMAPINFO_256
         {
            BITMAPINFOHEADER  bmiHeader;
            RGBQUAD                 bmiColors[256];
};


and also, how do i create a 32-bit transparent bitmap in photoshop for use in games?
tony
i am bumping your post as there is no reply as of yet. can't answer your question though - a bit technical. hopefully someone will be able to help you out Smile
MrBlueSky
riyadh wrote:
can anyone tell me what the code for a 32-bit bitmap will be in Dev C++. the code for an 8-bit bitmap is:
Code:
struct BITMAPINFO_256
         {
            BITMAPINFOHEADER  bmiHeader;
            RGBQUAD                 bmiColors[256];
};



I think:

Code:

struct BITMAPINFO {
  BITMAPINFOHEADER bmiHeader;
  RGBQUAD          bmiColors[1];
}



where you use

Code:

struct BITMAPINFOHEADER {
  DWORD  biSize;
  LONG   biWidth;
  LONG   biHeight;
  WORD   biPlanes;
  WORD   biBitCount;
  DWORD  biCompression;
  DWORD  biSizeImage;
  LONG   biXPelsPerMeter;
  LONG   biYPelsPerMeter;
  DWORD  biClrUsed;
  DWORD  biClrImportant;
};



with a biBitCount of 32.

See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_9qg5.asp for more information.
Related topics
Languages in c++
C++ TUTORIAL : INTRODUCTION TO C++
What's wrong with this C code???
C++
Tutorial on visual C++
C++ code help
This C code is little unclear to me.
PHP include code problem
C++ code
Funny with C code.
Handling /dev/dsp in C
10 frih$ contest: what does this c++ code do?
Slight problem with C code
Machine Problem No.2 [Pt. 1]
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.