I use oled display for print image. I painted image with details but my oled display printing with low fps. My images code like this : "0x80, 0x00, 0x00, 0x08, 0x7e, 0x20, 0x00, 0x21", and looks very large. I founded print image 8 bit like "B00001001". How can ı,convert image to "B00100100"
Shift left 2 times. Use the << operator.
An 8x8 image looks pretty tiny even on a small OLED screen.
It is easier to visualise in binary. e.g. 1 is a pixel, 0 is not.
{
0b10000000,
0b00000000,
0b00000000,
0b00001000,
0b01111110,
0b00100000,
0b00000000,
0b00100001
}
If you want two blank pixels on the right, shift each byte with << 2
but you are going to "lose" bits 6, 7 when they fall over the edge. e.g. 1st and 5th byte
If you really want to show a 128x64 picture just say so.
David.
0x80 and B10000000 are different representations of the same byte 128 (dec). The both take exactly one byte memory for storing.
That is, from the fact that you translate your picture into B10101000 format - its size in memory will not change in any way
1 Like
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.