Closed avafinger closed 2 years ago
FYI, the bmp header info is not filled up completely, you must assume the size, but there is something wrong with the padding.
Tested on Linux x64, same problem. So, lodepng_encode24_file(szbuf, data, bmInfoHeader->biWidth, bmInfoHeader->biHeight); does not consider padding.
passing data without the padding worked.
Hi @lvandeve , thanks for your work. I am trying to convert the data portion of a windows bitmap to png but it fails when (h % 4 ) > 0. There seems some alignment issue, I could not figure out.
The environment and compiler are Windows and Visual C, 32 bit. Perhaps I should force some alignment during compilation, can you suggest a possible fix or where I should look for in order to fix this?
Attached are the results of a successful conversion (264x264) and a failed one (198x198).
Works: original file:test_264x264.bmp.zip converted file: test_264x264.png.zip
Error: original file: test_198x198.bmp.zip converted file: test_198x198.png.zip