我用TFT显示图片,为什么显示出来的只是一条图片线。
这是显示图片的程序
void LCD_ShowImage(uint16_t x, uint16_t y, const unsigned char ucImageIfo[])
{
uint32_t i, j, k = 8;
uint16_t ImageHeight, ImageWidth;
ImageHeight = ucImageIfo[4] | (ucImageIfo[5] << 8);
ImageWidth = ucImageIfo[2] | (ucImageIfo[3] << 8);
for(j = y; j < (y + ImageHeight); j++) //j行
for(i = x; i < (x + ImageWidth); i++) //i列
{
LCD_SetPoint(i, j, ucImageIfo[k] | ucImageIfo[++k] << 8);
k++;
}
}
这是我编程的
LCD_ShowImage(0,0,(unsigned char *)gImage_c);