I am having a bit of bother getting a B&W logo, which I wish to display on an ST7565.
I have tried to convert the .BMP file I have with BMP2GLCD, but whatever command-line parameters I use, the result is always a '.h' file of arround 74KBytes ...
Here are the first few lines of the generated header file.
the result is always a '.h' file of arround 74KBytes
What were you expecting?
If you place the .h file in the same folder as your sketch, the next time the Arduino interface powers up it will be there as a tab in the window and automatically included in your sketch when you compile it.
I was expecting the .h file, but assumed that the command-line sizes for width and height would effect the values as shown in the .h file, and the size of the attendant char array.
What is shown in the snippet above - width 361 and height 266 don't seem to relate to my inputs of 128 and 64. I have tried with diffrent parameters ( for e.g. 16 x 16 for a really small graphic), but still get a 74 Kilo-Byte file.
The ram set aside for the LCD is 1KByte for the 128 x 64 Bit display - there is something I am missing.
I have scaled the graphic I want with gimp, and also used mspaint.
Next, I converted it with bmp2glcd - gives the expected .h file, which when included in my sketch, compiles and runs BUT the image on the display is as below, - really garbled
I know the hardware is correct, since the "adafruit industries" graphic comes out ok.
If I shuffle the 8 blocks of data produced by bmp2glcd into a diffrent order - I get a 'mirror' image, upside down of what I want
Any Ideas ?
TIA, Charlied
also - how does one post pictures - I can't find any 'browse' button ...
If you can visualise 8 equal bands, running across the display (L to R), then each one is upside-down. If I take the bottom one to the top, and the second-from-bottom to second from top, etc - then the image is correct, but inverted. - a few pictures will explain MUCH better - how do I post pictures ?
I wrote a python plug-in for the GIMP which saves a greyscale image to a C header file with 1 or 4 bits-per-pixel. It's a simple script and Python is easy to pick up, you can easily modify it to generate whatever array format you want.
It's posted on the Stellaris forums:
Google "Gimp generates C arrays for OLED & LCD images"
(First post here so I'm not allowed to include links)
If your running Windows you'll need Python support for GIMP which takes a few minutes to install. With GNU/Linux you'll be up and running in seconds. See the Python script for instructions.