You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is there a way of drawing custom bitmaps onto the display. I have found your examples but they appear to be using font sheets which isn't ideal for me. is there a way of sending the bytes that make up a bitmap?
cheers.
The text was updated successfully, but these errors were encountered:
The tricky thing with sending bitmap data is that the screen uses 1-bit-per-pixel, so you have to pack 8 pixels into a single byte. Have a look at the load_font_sheet() method, combined with the put_string() method to see how I handle loading and displaying the fontsheet data.
The easiest way to display an image would be to loop over all the pixels in your bitmap (assuming it will fit on the screen!) and call plot() to set each pixel of the display to white or black. You could write a nice helper method to do this for you.
A more efficient way would be to pre-calculate the 8-pixels-per-byte version of your image, then overwrite the appropriate part of the .fbuff array when you want to display it.
Hi, is there a way of drawing custom bitmaps onto the display. I have found your examples but they appear to be using font sheets which isn't ideal for me. is there a way of sending the bytes that make up a bitmap?
cheers.
The text was updated successfully, but these errors were encountered: