BMP draw.......

V

vicky

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 ...
 
A

adam majewski

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
 
B

Barry Schwarz

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.
 
M

MisterE

vicky said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

bmp file issues 2
WAV to BMP 9
Drawing missing in bitmap in a pure C win32 program 4
bmp//array questions 3
Confused Newbie 3
WAV to BMP & Back! 6
Help with my responsive home page 2
Help with code 0

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top