473,378 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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 2168
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
0
by: Florida Draw | last post by:
------=_NextPart_000_0012_1D5428A2.65C196F8 Content-Type: text/plain Content-Transfer-Encoding: 8bit Sign-up for the FREE Holiday Giveaway Draw You must register to be eligible for the draw....
5
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
3
by: Colin McGuire | last post by:
Hi there. I have written a small procedure to draw various shapes on things. A bit of it is shown below. Private Sub drawShape(ByVal shapeType As Integer, ByRef g As Graphics) Select Case...
2
by: dan heskett | last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some custom "fields" and text layout. Essentially it works, but I must be missing something big, conceptually, because I...
1
by: zxo102 | last post by:
Hi everyone, I have tried two days to figure out how to draw the image in wx.BufferedDC on the page created by AddPage of wx.Notebook but still got no clue. The attached example works fine. If...
3
by: Daniel Mark | last post by:
Hello all: I am looking the sample code posted on PIL website http://www.pythonware.com/library/pil/handbook/imagedraw.htm ################################################ <<Draw a Grey Cross...
1
by: Jeff Waskiewicz | last post by:
Hello All, I'm trying to solve a nagging problem. The goal is to draw a rectangle over the top of all the other controls on a form. Specifically, over a ChartFX control. The user would draw...
9
by: zhaow | last post by:
Hi, All Greetings! I want to develop as appllication that requires a line-drawing function in the blank area between two forms. I have looked up the MSDN, it says that a graphics object need a...
6
by: Arben | last post by:
Can anyone halp me to write the Java code for thid exercise? -------------------------------------------------------------------------------------------------------------- Exercise: Use the class...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.