sf
Joined: 02 Jul 2007 Posts: 9
|
Send image to LCD? |
Posted: Sat Jan 26, 2008 8:25 am |
|
|
Hi, to send a image i use this in lcd driver:
(using the GCLCD TODOPIC generator)
Code: |
void Lcd_image(int x, int y, int16 * img)
{
Int16 col, row, pWidth, pHeight;
pWidth =img[0];
pHeight =img[1];
for(row=0;row<pHeight;row++)
{
for(col=0;col<pWidth;col++)
{
LCD_Pixel(col+x,row+y,img[col+row*pWidth+2]);
}
}
}
|
And in the main program:
Quote: |
int16 imagem[200] = {
0x10,0x20,
0x1234,0x3eff,0xffee,.................
};
Lcd_image(10, 10, &imagem[0]);
|
Work´s perfectly,
But, and if i want to do this:
For this type of image:
Quote: | STATIC CONST UNSIGNED INT16 face_cool [1026]={ image data}; |
How can i use the LCD_image() to send the image to LCD? since i can´t use &face_cool[0]
there is any tip or i have to change the way to send to LCD (void Lcd_image(int x, int y, int16 * img)
Thank´s on advance.
Note: And if i store the data on external eeprom????? |
|