I noticed something peculiar using the BMP converter tool - the images are inverted when converted. It would be good if it simply didn't do this (is there a reason why it does this?), but it would be better if there was a button to invert whatever is on the display in the converter tool.
My daughter works with graphics, and is able to easily convert photographs and other clip art into 1-bit monochrome BMP files using Corel. Some of the results were surprisingly good, except they had to be inverted so that the result would come out right.
One other thing that would be nice is to be able to adjust the aspect ratio of the preview pane (the faux LCD panel) to match the aspect ratio of the target GLCD. They can vary significantly. In Corel (and I assume other graphics programs), the aspect ratio can be adjusted, if need be.
GLCD BMP converter invert
GLCD BMP converter invert
If you know what you're doing, you're not learning anything.
BTW - this is an example of what a graphic artist can do in about 5 minutes with with a real photograph and Corel photopaint:
This is in Pascal format, but can easily be converted to Basic or C.
Code: Select all
// ------------------------------------------------------
// GLCD Picture name: foo.bmp
// ------------------------------------------------------
const foo_bmp : array[1024] of byte = (
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240,240,248,252,252,254,254,254,254,255,255,255,255,255,255,255,
254,254,254,254,252,252,248,224,192,128,128, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,248,248,
0, 0, 0, 0, 0,224,224,224, 64,224,224,192, 0, 0,216,216,
216, 0,192,240,240,240,192, 0,224,224,224, 0, 0,224,224, 96,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,124,127,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,
127,127,127,255,255,255,255,255,255,255,255,255,254,252,248,240,
224,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,
0, 0, 0, 0, 0,255,255,255,128,255,255,255, 0, 0,255,255,
255, 0, 0,255,255,255,128, 0, 0, 31,255,254,192,255,255, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,192,128, 0, 0, 0, 0, 0, 0,
0,129,247,195, 3, 1, 1, 1, 1, 1, 1, 0,128, 0, 0, 0,
0, 0, 0, 0, 17, 29,255,255,255,255,255,255,255,255,255,255,
255,255,254,252,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
0, 0, 0, 0, 0, 7, 7, 7, 0, 1, 1, 0, 0, 0, 1, 1,
1, 0, 0, 0, 1, 1, 1, 0, 0, 6, 7, 7, 7, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 15,255,255, 0, 0,128,192,248,252,
255,125,253,253,124, 56,248,248,240,224,192, 1, 0, 0, 0, 44,
28,156, 60, 30, 31, 62, 39, 55, 31,127, 63, 63, 63,159,255,255,
255,255,255,255, 63,126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 48,252,252,252, 48, 0,254,254,254, 16,
248,248,240, 0, 0,224,248,248,152,248,240,224, 0, 0, 0, 0,
0, 0,248,248,248, 16,248,248,240, 0, 0,224,248,248, 24,248,
240,224, 0, 14, 30, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7,255,248, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0,192,135,135,195,129, 1, 0, 0, 8, 24,216,
80, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,224,251,255,255,
255,255,255,255, 62, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 63,127,127, 96, 0,127,127,127, 0,
127,127,127, 0, 0, 31, 63,127, 97,125,125, 29, 0, 0, 0, 0,
0, 0,255,255,255, 32,127,127, 63, 0, 0, 63,127,127, 96,127,
63, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,120, 95, 95,255,254,252,254,255,
254,254,252,248,252,255,255,255,255,223,223,205, 79, 15, 14, 15,
30, 30,126,124,252,252,252,248,248,248,252,255,255,255,255,255,
255,255,255,127, 6, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 1, 0,128,128,128, 0,128,128,128, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 3, 3, 0,128,192, 0, 24,127,255, 63,255,
255,255,255,255,255,255,255,255,255,252,252,248,248,248,248,248,
216,220,252,254,255,255,255,255,255,255,255,255,255,255,255,255,
255,127,127, 35, 0, 0,252, 64,120, 64, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,255,
255,253, 13, 0,248,254,254, 6,254,252,248, 0, 0, 0,248,254,
254, 6,254,252,248, 0, 3, 7, 3, 0,255,255,255, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,240,112, 0, 31,101, 0, 28,240,223,156,127,
115,195, 63,127,159,159, 63,127,127,255,255,255,255,255,255,255,
255,255,255,255,255,255,127,127,255,255, 63, 63, 31, 15, 3, 3,
0, 0, 0, 0, 0, 2, 1, 0,129, 24, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
31, 31, 0, 0, 15, 31, 31, 24, 31, 15, 7, 0, 0, 0, 15, 31,
31, 24, 31, 15, 7, 0, 0, 0, 0, 0, 29, 29, 29, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
);
If you know what you're doing, you're not learning anything.
Well...
Here's the code to see LGR's code on a Nokia 3310 LCD.
I only have a Nokia LCD so i had to modify the code
Here's the code to see LGR's code on a Nokia 3310 LCD.
I only have a Nokia LCD so i had to modify the code
Code: Select all
const foo_bmp : array[504] of byte = (
0, 0, 0, 0, 0, 0, 0,192,192,128, 0, 0, 0, 0, 0, 0,
0,129,247,195, 3, 1, 1, 1, 1, 1, 1, 0,128, 0, 0, 0,
0, 0, 0, 0, 17, 29,255,255,255,255,255,255,255,255,255,255,
255,255,254,252,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
0, 0, 0, 0, { 0, 7, 7, 7, 0, 1, 1, 0, 0, 0, 1, 1,
1, 0, 0, 0, 1, 1, 1, 0, 0, 6, 7, 7, 7, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
0, 0, 0, 0, 0, 0, 1, 15,255,255, 0, 0,128,192,248,252,
255,125,253,253,124, 56,248,248,240,224,192, 1, 0, 0, 0, 44,
28,156, 60, 30, 31, 62, 39, 55, 31,127, 63, 63, 63,159,255,255,
255,255,255,255, 63,126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 48,252,252,252, 48, 0,254,254,254, 16,
248,248,240, 0, { 0,224,248,248,152,248,240,224, 0, 0, 0, 0,
0, 0,248,248,248, 16,248,248,240, 0, 0,224,248,248, 24,248,
240,224, 0, 14, 30, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
0, 0, 0, 0, 0, 0, 0, 0, 7,255,248, 0, 0, 0, 0, 0,
1, 1, 0, 0, 0,192,135,135,195,129, 1, 0, 0, 8, 24,216,
80, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,224,251,255,255,
255,255,255,255, 62, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 63,127,127, 96, 0,127,127,127, 0,
127,127,127, 0,{ 0, 31, 63,127, 97,125,125, 29, 0, 0, 0, 0,
0, 0,255,255,255, 32,127,127, 63, 0, 0, 63,127,127, 96,127,
63, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
0, 0, 0, 0, 0, 0, 0,192,120, 95, 95,255,254,252,254,255,
254,254,252,248,252,255,255,255,255,223,223,205, 79, 15, 14, 15,
30, 30,126,124,252,252,252,248,248,248,252,255, 255,255,255,255,
255,255,255,127, 6, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
128,128,128, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 1, 1, 0,128,128,128, 0,128,128,128, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
0, 0, 0, 0, 0, 3, 3, 0,128,192, 0, 24,127,255, 63,255,
255,255,255,255,255,255,255,255,255,252,252,248,248,248,248,248,
216,220,252,254,255,255,255,255,255,255,255,255, 255,255,255,255,
255,127,127, 35, 0, 0,252, 64,120, 64, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,255,
255,253, 13, 0,{248,254,254, 6,254,252,248, 0, 0, 0,248,254,
254, 6,254,252,248, 0, 3, 7, 3, 0,255,255,255, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }
0, 0, 0, 0, 0,240,112, 0, 31,101, 0, 28,240,223,156,127,
115,195, 63,127,159,159, 63,127,127,255,255,255,255,255,255,255,
255,255,255,255,255,255,127,127,255,255, 63, 63, 31, 15, 3, 3,
0, 0, 0, 0, 0, 2, 1, 0,129, 24, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
31, 31, 0, 0{, 15, 31, 31, 24, 31, 15, 7, 0, 0, 0, 15, 31,
31, 24, 31, 15, 7, 0, 0, 0, 0, 0, 29, 29, 29, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
Last edited by anton on 03 Apr 2005 20:22, edited 1 time in total.
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)
Back on the subject of mikroPascal Wish List, my daughter and I fiddled a little more, and concluded that you can do the same thing with the GIMP. The significance of this is that GIMP is GNU (free) and can run scripts. This would make it relatively easy to link the GLCD image editor to GIMP, and have scripts to do image convertions, large fonts, etc. And, yes, GIMP is available for windows (as well as unix and mac).
With this, you can do anything that is physically possible.
With this, you can do anything that is physically possible.
If you know what you're doing, you're not learning anything.
1. The capabilities needed to do what I was talking about include:anton wrote:A simple program like windows Paint also works
a. importing images, such as jpg
b. changing the aspect ratio to match the GLCD
c. scaling to a specified number of pixels
d. converting the color or greyscale image to 1-bit
e adding to the canvass so that the result ends up being 128x64, or whatever you're working with
f. adding fonts in any size and format that you wish.
I'm sure paint can't do all of that.
2. With the ability to write scripts, you can integrate and automate.
If you know what you're doing, you're not learning anything.