0

which field in BITMAPFILEHEADER & BITMAPINFOHEADER represents the size of the image? whether it is bfSize of BITMAPFILEHEADER or biSizeImage of BITMAPINFOHEADER as in the specification at https://msdn.microsoft.com/en-us/library/dd183374(VS.85).aspx and https://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx of both the fields says that both represents the size of the image or to be direct which I should update in resize program.

Thank you.

1 Answer 1

2

You need to update both, bfSize is the size in bytes of the complete bmp file (headers + pixels + padding if needed), and biSizeImage is the size in bytes only of the pixels information, this includes also padding if needed.

2
  • biSizeImage is size of total no. of pixels in the image file or pixels in one row.
    – user299731
    Commented Jun 16, 2015 at 10:28
  • @user299731 the total number of the image
    – wallek876
    Commented Jun 16, 2015 at 12:56

You must log in to answer this question.

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