0

Understanding the bitmap function of the OLED library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Understanding the bitmap function of the OLED library

by gonadgranny on Tue Nov 21, 2017 2:09 pm

Hi there. I have been fiddling around with a 128*32 OLED screen and the respective adafruit libraries trying to get the bitmap function to work. I have got it to display my graphics correctly but only when the pixel height is 32 (the height of the screen). anything without a height of 32 comes out as garbage(adjusting the width is fine). I am using this http://javl.github.io/image2cpp/ tool to convert my images. is keeping the heigh of the graphic equal to the display size a requirement or am i doing something wrong? Thanks.

gonadgranny
 
Posts: 2
Joined: Tue Nov 21, 2017 1:53 pm

Re: Understanding the bitmap function of the OLED library

by adafruit_support_carter on Thu Nov 23, 2017 1:14 pm

is keeping the heigh of the graphic equal to the display size a requirement or am i doing something wrong?

Yep. There's no scaling done on the image by the GFX library:
https://learn.adafruit.com/adafruit-gfx ... es#bitmaps

adafruit_support_carter
 
Posts: 3446
Joined: Tue Nov 29, 2016 2:45 pm

Re: Understanding the bitmap function of the OLED library

by gonadgranny on Mon Dec 04, 2017 8:19 am

Thanks for the reply. In the demo there are lots of little adafruit logos which suggest that it is possible to display bitmaps which are smaller than the screen height...?

gonadgranny
 
Posts: 2
Joined: Tue Nov 21, 2017 1:53 pm

Re: Understanding the bitmap function of the OLED library

by adafruit_support_carter on Mon Dec 04, 2017 12:32 pm

Yes, that's possible. In the call to the drawBitmap() function you specify the location and size of the bitmap. So for a bitmap smaller than the screen, you can locate it where ever you want.

adafruit_support_carter
 
Posts: 3446
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.