Connecting Tech Pros Worldwide Help | Site Map

BMP draw.......

  #1  
Old September 1st, 2008, 07:05 PM
vicky
Guest
 
Posts: n/a
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

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

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

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)
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
draw an image in wx.BufferedDC onto the page created by AddPage of wx.Notebook zxo102 answers 1 August 10th, 2006 08:05 PM
Image.Save( ..., ImageFormat.Bmp ) slow in simple case F. Hall answers 0 November 22nd, 2005 01:25 PM
Make a color transparent in a gif, jpg, bmp? Its black! Chris Auer answers 1 November 17th, 2005 05:20 AM
Image.Save( ..., ImageFormat.Bmp ) slow in simple case F. Hall answers 0 July 21st, 2005 05:19 PM