Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: tracyb on August 26, 2015, 09:27:36 AM

Title: Graphic OLED bmp converter
Post by: tracyb on August 26, 2015, 09:27:36 AM
Hi all,

I have the 2.7 inch OLED part number NHD-2.7-12864UCY3

I am trying to put up a few graphics and also some text. I tried to use paint to generate a 128x64 black and white image and then saved that as a bmp. I loaded this into the novatronica oled bitmap tool to convert it to a 4069 array.

While I do see the text and the heart the quality is really bad - much worse then the screen is capable of.

What would be a better why of getting text and images onto the screen?




Title: Re: Graphic OLED bmp converter
Post by: Saurabh_B on August 26, 2015, 09:56:55 AM
Hi,

We personally use the LCDAssistant (http://en.radzio.dxp.pl/bitmap_converter/). It is freeware that converts any monochrome bmp into a hex dump which can just be copied and used into the program. The display seemed just fine when it was displaying the image from that program.

I was wondering if you could post a picture of the image you wanted to display, and how the image on the display looked. Also if possible the hexdump from the bmp tool you were using along with the subroutine to display the image.
Title: Re: Graphic OLED bmp converter
Post by: tracyb on August 26, 2015, 10:38:31 AM
I tried LCD assistant - however I got a whole bunch of garbage out. Values that weren't 0xFF and 0x00 on a black and white image. I used the following settings:

Byte orientation horizontal, width 128, height 64, little endianness, 2 pixels per byte.

So for a plain small black and white heart my txt dump was as follows:
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7A, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x79, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2E, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2D,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x21, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x31, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2D, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x21, 0x33, 0x7B, 0x32, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x31, 0x2F, 0x0F, 0x0A, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2D, 0x22, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x21, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x31, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x32, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7A, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C, 0x08, 0x30,
0x78, 0x30, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x32, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x0C,
0x08, 0x31, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2D, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2E, 0x20, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x79,
0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C, 0x20, 0x30,
0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78, 0x30, 0x30,
0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x31, 0x7B,
0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2C, 0x20, 0x30, 0x78,
0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x3B, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x47, 0x43, 0x2F, 0x23, 0x33, 0x7B, 0x43,
0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x3B, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x30, 0x30, 0x2C,
0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x31, 0x7B, 0x33,
0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x22, 0x30, 0x78,
0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x30, 0x78, 0x31, 0x33, 0x2F, 0x23,
0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B,
0x33, 0x37, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x37, 0x2C, 0x20,
0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2C, 0x20, 0x33, 0x7B, 0x33, 0x33,
0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x0F, 0x0B, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x37, 0x33, 0x2F,
0x23, 0x33, 0x7B, 0x33, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x34,
0x30, 0x2C, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2C, 0x20, 0x30, 0x78, 0x31, 0x33, 0x2F, 0x23, 0x33,
0x7B, 0x37, 0x33, 0x2F, 0x23, 0x33, 0x7B, 0x47, 0x47, 0x2F, 0x23, 0x33, 0x7B, 0x47, 0x43, 0x2F,

...
};


Which you can see will put greyscale pixels everywhere. (I have truncated it a bit)

Also quick idiot question but how do I load images here? There isn't an option to embed them in the post..
Title: Re: Graphic OLED bmp converter
Post by: Saurabh_B on August 27, 2015, 10:18:08 AM
One way of doing this is converting a hexdump with LCD Assistant with the following settings:
Horizontal Byte Orientation
Little Endian
8pixels/byte

The variables I pass to the function are:
*img = points to image hexdump array
a = column start
b = column end
c = row start
d = row end

Code: [Select]
void Show(unsigned char *img, unsigned char a, unsigned char b, unsigned char c, unsigned char d) {
 
  unsigned char    *src, temp, result;  // Source Pointer, Temp Value, Result after masking
  unsigned char i, j;                   //Variables for loops
  int cnt = 0;                          //Counter for array
  column(a, (b/2));                     //Column Set
  row(c, d);                            //Row Set
  src = img;

 /****************DISPLAY LOOP*******************************/
  for (i = 0; i <= d; i++)   // monochrome image only, no grayscale so pixels are on or off.
  {
    for (j = 0; j <= (b/8); j++)
    {
      temp = *src;
      result = temp & 0xC0; // Mask for 2 MSB
      if( result == 0xC0 ) {data(0xFF);}
      else if ( result == 0x80 ) {data(0xF0);}
      else if ( result == 0x40 ) {data(0x0F);}
      else data(0x00);

      result = temp & 0x30; // mask for next 2 bits
      if ( result == 0x30 ) {data(0xFF);}
      else if( result == 0x20 ){ data(0xF0);}
      else if( result == 0x10 ){ data(0x0F);}
      else data(0x00);

      result = temp & 0x0C; //mask for bits 3&4
      if ( result == 0x0C) {data(0xFF);}
      else if( result == 0x08 ) {data (0xF0);}
      else if( result == 0x04 ) {data (0x0F);}
      else data(0x00);

      result = temp & 0x03;
      if( result == 0x03 ) {data(0xFF);}
      else if( result == 0x02) {data(0xF0);}
      else if( result == 0x01) {data(0x0F);}
      else data(0x00);
      src++;     
    }
  }
}