-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2016-01-04 um 18:51 schrieb Aaryaman Vasishta:
- file_header.bfSize = ((((w * bpp + 31) & ~31) >> 3) * h) +
file_header.bfOffBits;
This suggests (if I understand it right) that the on-disk bmp is written with 4 byte aligned rows (i.e., similar to bytes_per_line being 4 byte aligned in some cases). The actual image you generate doesn't match that though, so you have some unused data at the end.
It's possible that this size alignment is necessary though. Why are you using it instead of just using w * h * (bpp / 8)?
On Sat, Jan 9, 2016 at 5:17 AM, Stefan Dösinger stefandoesinger@gmail.com wrote:
It's possible that this size alignment is necessary though. Why are you using it instead of just using w * h * (bpp / 8)?
It's just for the 4 byte aligned in some cases. And if the size
exceeds/doesn't match then it's not really an issue for testing purposes atleast. I try using w * h * (bpp/8) if you want though.