|
-
February 10th, 2008, 04:00 AM
#1
Two extra bytes at end of each bitmap row.
Hello,
I wrote a function that reads the BITMAPFILEHEADER, then the BITMAPINFOHEADER, and finally the byte array containing the color values of a 24 bit bitmap into memory. Then, I saved the color values to a text document so that I could read the values to test the function. I eventually realized that each row of a bitmap has two bytes appended to the end of it. What I would like to know is the purpose of these two bytes. Thank you for your help.
dremmuel
-
February 10th, 2008, 08:51 AM
#2
Re: Two extra bytes at end of each bitmap row.
The extra bytes are there to make each row align to a DWORD memory address. The number will vary based on the length of the row and bits/pixel. A row of pixels with 8 or 16 b/p and a count divisible by 4, for example, will not have extra bytes.
-
February 10th, 2008, 04:04 PM
#3
Re: Two extra bytes at end of each bitmap row.
0xC0000005, thank you for the explanation. That really clears things up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|