Drawing animated GIF

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Drawing animated GIF

803 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by an.skornyakov on Thu Aug 09 04:25:41 MST 2012
I'm trying to show animated gif file on my device. Image buffer placed in SDRAM. MEMDEV is used for displaying GIF. Animation displayed, but with huge distortions. There are sample in images attached. Originally, that was Bart Simpsons.

code:
   hMem = GUI_MEMDEV_Create(XPos, YPos, GifInfo.xSize, GifInfo.ySize);
   GUI_MEMDEV_Select(hMem);
                      
   for (j = 0; j < GifInfo.NumImages; j++){
      GUI_MEMDEV_Clear(hMem);
      GUI_ClearRect(XPos, YPos, GifInfo.xSize, GifInfo.ySize);
      GUI_GIF_DrawSub(_aImgBuffer, fStat.st_size, XPos, YPos, j);
      GUI_MEMDEV_CopyToLCD(hMem);
      GUI_GIF_GetImageInfo(_aImgBuffer, fStat.st_size, &ImageInfo, j);      
      GUI_Delay(ImageInfo.Delay ? ImageInfo.Delay * 5 : 100);   
   }
                                           
   GUI_MEMDEV_Delete(hMem);
标签 (1)
0 项奖励
回复
0 回复数