Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

(URGENT) bitmap format

Posted on 1999-07-24
6
Medium Priority
?
254 Views
Last Modified: 2013-12-03
hi,

i know windows bitmap format includes bitmapheader, etc... they're all given as structure.. which consist of WORD and DWORD variables...

1. how many bytes exactly is a WORD and DWORD?
2. when i use fopen to read a .bmp file, how do i read the format in hexadecimal format(or some other format??) such that i know which byte refers to the header, colour etc?
3. am i right to say that a hexadecimal no. like "4E" is one byte (i.e. 8 bits)?

thanks a million :)))
0
Comment
Question by:nglp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 8

Expert Comment

by:shlomoy
ID: 1263873
0
 

Author Comment

by:nglp
ID: 1263874

Sorry, but i dun think u've answered my queries...??

0
 
LVL 8

Expert Comment

by:shlomoy
ID: 1263875
I didn't answer.
I've just supplies some links which might have the solution.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:nglp
ID: 1263876

Oops, sorrie :)) thanks!
0
 
LVL 8

Expert Comment

by:shlomoy
ID: 1263877
if it helps you, I don't mind if you consider it as an answer.
0
 
LVL 4

Accepted Solution

by:
nil_dib earned 40 total points
ID: 1263878
1. WORD = unsigned short = 0 to 65,535
DWORD = unsigned long = 0 to 4,294,967,295
2. you can use getc which reads one character (1 byte)
3. right! 1 byte(8 bit) is 0 to 255 decimal ( 2^8 = 256 )
so FF hex is 255. hence each value greater than 255 dec requires two or more bytes ...
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question