What is the difference between bisizeimage, bisize and bfsize?

I am new to this field and I am confused between some terms!

bisizeimage , bisize and bfsize !

please, I need simple definitions for each of them, and if there are equations for calculating them?

edited: ("answered friend")

biSize> The number of bytes needed for the structure. (what is the structure exactly?)

A structure is a BITMAPINFOHEADER structure. This is a fixed value.

biSizeImage> Size in bytes of the image. bfSize> Size, in bytes, of the bitmap file. (what is the difference between an image and a raster file?)

biSizeImage is the entire size of the image, bfSize is the same, but you must add the size of 2 header files.

+4
source share
3 answers
bfSize = biSizeImage + sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)
bfSize = biSizeImage + 54               

// since BITMAPFILEHEADER = 40 and BITMAPINFOHEADER = 14 

biSizeImage = (biWidth * sizeof(RGBTRIPLE) + padding) * abs(biHeight) 
+5
source

One tiny typo in @ Shock451's answer. According to https://en.wikipedia.org/wiki/BMP_file_format, the values ​​of BITMAPFILEHEADER and BITMAPINFOHEADER are swapped.

Must be:

// since BITMAPFILEHEADER = 14 and BITMAPINFOHEADER = 40

not

// since BITMAPFILEHEADER = 40 and BITMAPINFOHEADER = 14
+1
source

bfSize - , :

  • ( = biSize)
  • ( = biSizeImage)

,

bfSize = biSize + biSizeImage 

, biSize ( )

,

bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + biSizeImage

( BMP) BITMAPFILEHEADER 14 , BITMAPINFOHEADER 40 ,

bfSize = 54 + biSizeImage

, " " .

biSizeImage. , , * * . 24- BMP 3 (0-255 , , , ) - RGB. : , , - LittleEndianness . BMP 0 , 4 .

biSizeImage = (biWidth * sizeof(RGBTRIPLE) + padding) * abs(biHeight) 

, :

  • biSizeImage= BMP
  • biSize= BMP
  • bfsize = file size in bytes of the full BMP (including the header and image itself)

A detailed overview of the BMP structure can be found here.

0
source

All Articles