Hello,
I have a problem drawing animated GIF using GUI_GIF_DrawSub(). I'm loading GIF file via Ethernet to device and store it in Nand-flash + file system (UFFS). Then I load whole animated GIF file from NAND to buffer in SDRAM and try to show it using GUI_GIF_DrawSub():
Display All
In fact, animation is really displayed, but often with huge distortion on it (example is in the end of topic).
All buffers for LCD and emWin are placed in SDRAM, SDRAM and NANd-flash drived via EMC, device is based on NXP LPC1788 microcontoller.
Does anybody know, what can be a reason?
Thanks.
[img]http://www.lpcware.com/sites/default/files/images/CSC_0859.JPG[/img]
[img]http://www.lpcware.com/sites/default/files/images/CSC_0860.JPG[/img]
I have a problem drawing animated GIF using GUI_GIF_DrawSub(). I'm loading GIF file via Ethernet to device and store it in Nand-flash + file system (UFFS). Then I load whole animated GIF file from NAND to buffer in SDRAM and try to show it using GUI_GIF_DrawSub():
C Source Code
- GUI_ClearRect(0, 0, 800, 480);
- GUI_GIF_GetInfo(_aImgBuffer, fStat.st_size, &GifInfo); // aImgBuffer - buffer for animated GIF file in SDRAM
- XPos = (GifInfo.xSize > 320) ? 0 : 160 - (GifInfo.xSize / 2);
- YPos = (GifInfo.ySize > 180) ? 60 : 150 - (GifInfo.ySize / 2);
- XPos = 400 - GifInfo.xSize/2;
- YPos = 240 - GifInfo.ySize/2;
- for (j = 0; j < GifInfo.NumImages; j++) {
- GUI_MULTIBUF_Begin();
- GUI_Clear();GUI_GIF_DrawSub(_aImgBuffer, fStat.st_size, XPos, YPos, j);
- GUI_MULTIBUF_End();
- GUI_GIF_GetImageInfo(_aImgBuffer2, fStat.st_size, &ImageInfo, j);
- GUI_Delay(ImageInfo.Delay ? ImageInfo.Delay * 10 :100);
- }
In fact, animation is really displayed, but often with huge distortion on it (example is in the end of topic).
All buffers for LCD and emWin are placed in SDRAM, SDRAM and NANd-flash drived via EMC, device is based on NXP LPC1788 microcontoller.
Does anybody know, what can be a reason?
Thanks.
[img]http://www.lpcware.com/sites/default/files/images/CSC_0859.JPG[/img]
[img]http://www.lpcware.com/sites/default/files/images/CSC_0860.JPG[/img]