Question

I have a bmp file. I have read in its header that its size is "56 5A 03" which means 0x035A56. However, every Hex editor that I use to see the contents of that file shows me 0x038000 bytes for this file.

  • My general question is that does bmp file contains a trailer/footer?
  • in the mentioned case, what is the problem?

Thanks.

Was it helpful?

Solution

The Wikipedia page on the BMP format describes the format, and describes that field in the header as "the image size. This is the size of the raw bitmap data (see below), and should not be confused with the file size." which means it's likely not counting the padding between pixels.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top