Closed Fredy12335 closed 4 years ago
Attaching the bitmap.
I see that there were similar issues in the closed cases.
I did some quick tests today and it seems the exported image is slightly too large but it does still look the way it's supposed to on my display (using the bytes I get after converting from an image). Reading the bytes back in does give me a garbled image unless I tweak the width a bit (a 21px wide image had to be read in as 24px) which adds a small border.
Still need to figure this out: I'd love to get this to work once and for all. Maybe I'd need some sort of testing system so I can easily convert multiple test images and see if the results are as expected.
Thank you for your quick reaction. if I can help you with testing or something, please let me know.
This is logical.
When writing the bytes out, each line is rounded up to multiple of a byte. The input image is 21 pixels wide, so for each line 3 bytes are used (= 24 pixels but the 3 rightmost should be ignored when rendering).
The solution is to round the image width up to the nearest byte when interpreting the data.
Pull request with the solution is sent.
oh and @Fredy12335 : when drawing the image on your lcd screen, specify a width of 21 pixels. Normally the drawBitmap function will ignore the trailing bits on each line and the character should be rendered as intended.
I believe this was solved (thanks again, @jochenderwae) so I'm closing the issue.
Hy! I don't write much the picture says it all.![Névtelen](https://user-images.githubusercontent.com/58340950/69883984-b825ae80-12d6-11ea-900b-198f25e211b2.jpg)