小弟调试stm32F7+emwin 显示多边形、图片什么的都是正常的,但是当我显示gif图片时,程序直接死掉,我看了一下,程序死在了GUI_GIF_DrawSub(pFile, FileSize, XPos, YPos, j);这一句,请各位帮忙分析分析。调试代码用的是仿真例程里面的,仿真程序是可以正常跑的。
void _ShowMovie(const char * pFile, int FileSize) {
GUI_GIF_IMAGE_INFO ImageInfo = {0}; // Info structure of one particular GIF image of the GIF file
GUI_GIF_INFO GifInfo = {0}; // Info structure of GIF file
int i;
int j;
int XPos;
int YPos;
//
// Display sample information
//
GUI_SetFont(&GUI_Font8x16);
GUI_ClearRect(0, 40, 319, 59);
GUI_DispStringHCenterAt("Show complete GIF file as movie", 160, 40);
//
// Show movie
//
GUI_ClearRect(0, 60, 319, 239); // Clear the image area
GUI_GIF_GetInfo(pFile, FileSize, &GifInfo); // Get GIF info structure
XPos = (GifInfo.xSize > 320) ? 0 : 160 - (GifInfo.xSize / 2);
YPos = (GifInfo.ySize > 180) ? 60 : 150 - (GifInfo.ySize / 2);
for (i = 0; i < 2; i++) { // Show the complete GIF 2 times ...
for (j = 0; j < GifInfo.NumImages; j++) {
GUI_GIF_DrawSub(pFile, FileSize, XPos, YPos, j); // Draw sub image
GUI_GIF_GetImageInfo(pFile, FileSize, &ImageInfo, j); // Get sub image information
GUI_Delay(ImageInfo.Delay ? ImageInfo.Delay * 10 : 100); // Use the Delay member of the ImageInfo structure for waiting a while
}
GUI_Delay(2000); // Wait a while
}
}