這是我最近玩esp32寫的tft(動態也就一個短視頻或者GIF一幀一幀顯示,連起來就是動圖了)
其實我們所看的視頻也都是一幀一幀連起來的
希望對樓主有幫助
void Imge_display(unsigned char debug)
{
tft.setSwapBytes(true); //使圖片顏色由RGB->BGR ps:必須
if (debug == Debug_ok)
{
}
else if (debug == Debug_no)
{
tft.pushImage(0, 0, 128, 160, Hutao[imge_num]);
//delay(50);
imge_num += 1;
if (imge_num > 13)
{
imge_num = 0;
}
}
else
{
}
}
|