0

I find that a bitmap which is been provided has following properties.

{biSize = 40, biWidth = 3, biHeight = -3, biPlanes = 1, biBitCount = 24, biCompression = 0, biSizeImage = 36, biXPelsPerMeter = 2834,   biYPelsPerMeter = 2834, biClrUsed = 0, biClrImportant = 0}

My question is that why its biSizeImage is't 3 * 3 * 3 = 27 ?

Thank you!

1 Answer 1

1

Because the width of your image has to be a multiple of 4, in fact the next multiple of 4 of your width. Since the width is 3, the next multiple of 4 is 4. So you have to add one pixel of padding. And the size then is: 4 x 3 x 3 = 36. So biSizeImage is the number of pixels, plus the padding. Keep watching the pset's videos and you will get a better idea.

2
  • Oh I see. Thank you!
    – Zheng
    Jul 16, 2015 at 12:59
  • You can mark the answer as accepted! Have a nice day!
    – ChrisG
    Jul 16, 2015 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .