Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 1st, 2008, 07:05 PM
vicky
Guest
 
Posts: n/a
Default 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 ...
  #2  
Old September 1st, 2008, 07:25 PM
adam majewski
Guest
 
Posts: n/a
Default Re: BMP draw.......

vicky pisze:
Quote:
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
  #3  
Old September 1st, 2008, 08:15 PM
Barry Schwarz
Guest
 
Posts: n/a
Default Re: BMP draw.......

On Mon, 1 Sep 2008 10:59:48 -0700 (PDT), vicky
<vikrant.pandey@gmail.comwrote:
Quote:
>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
  #4  
Old September 18th, 2008, 09:45 AM
MisterE
Guest
 
Posts: n/a
Default Re: BMP draw.......

vicky wrote:
Quote:
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)
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.