jtkirkpatrick / bitmap

Write bitmap files (.bmp) in pure Python
MIT License
0 stars 0 forks source link

Height and width should be interpreted as signed integer ` "<i" ` for some headers #1

Closed Crowerade closed 2 hours ago

Crowerade commented 2 hours ago

Some headers allow height and width to be negative (for instance BITMAPINFOHEADER) and height is often negative as the pixel array goes from bottom to top. Interpreting it as unsigned integer gives an enormous number that does not make any sense. As this differs from one version of header to another, it might be a good idea to have various interpretation options that matches the header version.

Crowerade commented 2 hours ago

I am on the wrong repository... :,)