2016-06-11 63 views

回答

1

根据Wikipedia - BMP file format

Offset (hex) Offset (dec) Size (bytes) Windows BITMAPINFOHEADER[1] 
0E    14    4    the size of this header (40 bytes) 
12    18    4    the bitmap width in pixels (signed integer) 
16    22    4    the bitmap height in pixels (signed integer) 

随着您发布的位图头,宽度和高度将

Width: D1 02 00 00 
Height: 1D 02 00 00 

上面的维基百科链接指出

所有整数值以little-endian格式存储(即 最低有效字节fir ST)。

如果我的理解是正确的,要转换为

Width = 209 + (2 x 256) + (0 x 256^2) + (0 x 256^3) = 721 
Height = 29 + (2 x 256) + (0 x 256^2) + (0 x 256^3) = 541 
相关问题