468,292 Members | 1,456 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,292 developers. It's quick & easy.

BMP draw.......

I've a code in which the structure of Bitmap is given as ----

typedef struct
{
U8 uFlags; // combination of flags above
U8 uBitsPix; // 1, 2, 4, 8, 16, or 24
U16 wWidth; // in pixels
U16 wHeight; // in pixels
U16 dTransColor; // transparent color for 8bpp
bitmaps
U8 *pStart; // bitmap data pointer

}GfxBitmap;

an example for this structure is...

GfxBitmap gbHighlightOptionBitmap = { 0x11, 8, 250, 38, 0x00000000,
(UCHAR *) ucHighlightOptionBitmap };

now my query is that if this is a complete header for bmp file then
what about the header for window which is above 50 bytes

Can u also give over view of this structure ...as what is uFlag and
dTransColor ...
Sep 1 '08 #1
3 1899
vicky pisze:
I've a code in which the structure of Bitmap is given as ----

typedef struct
{
U8 uFlags; // combination of flags above
U8 uBitsPix; // 1, 2, 4, 8, 16, or 24
U16 wWidth; // in pixels
U16 wHeight; // in pixels
U16 dTransColor; // transparent color for 8bpp
bitmaps
U8 *pStart; // bitmap data pointer

}GfxBitmap;

an example for this structure is...

GfxBitmap gbHighlightOptionBitmap = { 0x11, 8, 250, 38, 0x00000000,
(UCHAR *) ucHighlightOptionBitmap };

now my query is that if this is a complete header for bmp file then
what about the header for window which is above 50 bytes

Can u also give over view of this structure ...as what is uFlag and
dTransColor ...
Maybe this helps :

http://local.wasp.uwa.edu.au/~pbourke/dataformats/bmp/
http://entropymine.com/jason/bmpsuite/

What do you think about creating PPM files ? Its simpler.

http://fraktal.republika.pl/g_file.html

Regards

Adam
Sep 1 '08 #2
On Mon, 1 Sep 2008 10:59:48 -0700 (PDT), vicky
<vi************@gmail.comwrote:
>I've a code in which the structure of Bitmap is given as ----

typedef struct
{
U8 uFlags; // combination of flags above
U8 uBitsPix; // 1, 2, 4, 8, 16, or 24
U16 wWidth; // in pixels
U16 wHeight; // in pixels
U16 dTransColor; // transparent color for 8bpp
bitmaps
U8 *pStart; // bitmap data pointer

}GfxBitmap;

an example for this structure is...

GfxBitmap gbHighlightOptionBitmap = { 0x11, 8, 250, 38, 0x00000000,
(UCHAR *) ucHighlightOptionBitmap };

now my query is that if this is a complete header for bmp file then
what about the header for window which is above 50 bytes

Can u also give over view of this structure ...as what is uFlag and
dTransColor ...
This not a question about the C language but about a library package
(apparently written in C). If the "window" you refer to is Windows,
you will have better luck asking in one of the Windows or Microsoft
groups. If you are referring to OpenWin, you could ask in a Unix
group.

--
Remove del for email
Sep 1 '08 #3
vicky wrote:
I've a code in which the structure of Bitmap is given as ----

typedef struct
{
U8 uFlags; // combination of flags above
U8 uBitsPix; // 1, 2, 4, 8, 16, or 24
U16 wWidth; // in pixels
U16 wHeight; // in pixels
U16 dTransColor; // transparent color for 8bpp
bitmaps
U8 *pStart; // bitmap data pointer

}GfxBitmap;

an example for this structure is...

GfxBitmap gbHighlightOptionBitmap = { 0x11, 8, 250, 38, 0x00000000,
(UCHAR *) ucHighlightOptionBitmap };

now my query is that if this is a complete header for bmp file then
what about the header for window which is above 50 bytes

Can u also give over view of this structure ...as what is uFlag and
dTransColor ...
You have been missinformed. The header is (assuming unsigned short is 2
bytes and unsigned int is 4 bytes):
unsigned short bfType;
unsigned int bfSize;
unsigned short bfReserved1;
unsigned short bfReserved2;
unsigned int bOffBits;
unsigned int biSize;
unsigned int biWidth;
unsigned int biHeight;
unsigned short biPlanes;
unsigned short biBitCount;
unsigned int biCompression;
unsigned int biSizeImage;
unsigned int biXPelsPerMeter;
unsigned int biYPelsPerMeter;
unsigned int biClrUsed;
unsigned int biClrImportant;

What you have posted seems to be a struct for something that is nothing
to do with a BMP file, but just some format a program uses after it has
read the file.

(Even the wikipedia page on BMP will give you this sort of info go and
read about BMP format there)
Sep 18 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Matt | last post: by
reply views Thread by Florida Draw | last post: by
5 posts views Thread by Matt | last post: by
2 posts views Thread by dan heskett | last post: by
3 posts views Thread by Daniel Mark | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.