Tuesday, April 24th 2018, 12:12pm UTC+2

You are not logged in.

  • Login
  • Register

himsha

Beginner

Date of registration: Feb 21st 2018

Posts: 12

1

Wednesday, April 11th 2018, 10:49am

gif image

hi,
I had generated c file from gif image using bmpcvt from File-Create animated sprite from GIF file is attached.

Problem is I now not able to find out the way to use generated file. I had seen the example but generated file got more than one functions. If somebody put gif on TFT do let me know the way.
himsha has attached the following file:
  • preloader.zip (24.83 kB - 16 times downloaded - Last download: Today, 9:03am)

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 562

2

Thursday, April 12th 2018, 11:42am

Hi,

I have taken a look into your files. The GIF file seems not to be animated. Regarding the c-file, simply copy the content into your application and call GUI_DrawBitmap(&bmpreloadersm, xPos, yPos).

If you want to have an animated GIF, please check the code attached.

The c-file was created with the Bitmap Converter. Open the Converter and select File -> Create animated Sprite from GIF (I guess you did it the same way).

The example shows two ways. One way is to use the GIF directly and manage drawing of all the sub images on your own and the second way is to use a SPRITE. For the first method I have converted the GIF file into a c-array using the Bin2C tool. For second method I use a sprite created as described above.

A third method would be to use the IMAGE widget and set a GIF file. It will also animated automatically. Please refer to the IMAGE widget API in the emWin user manual.

Regards
Sven