GIF drawing performance

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GIF drawing performance

      Hello,

      Am using Image_setGif for setting the gif's which seems to be affecting the timing for the other tasks in my application. I have 4 gifs which animate at a time on one screen.
      I have certain tasks which have to be executed every 5 seconds but the gif drawing affects this timing.

      Is there any way the performance can be increased or any other method of drawing which increases the gif drawing performance.

      Thanks
      Regards,
      Anuj
    • Hi,

      Depending on the size of your GIFs, the timing could become inaccurate if decoding of the GIFs takes too much time. To boost performance, you could convert your GIFs into animated sprites which do not have to be decoded during runtime. They are essentially an array of bitmaps and time stamps and therefore much faster than GIFs.

      Select "File --> Create animated sprite from GIF" in the Bitmap Converter to convert your GIF into a sprite. GUI_SPRITE_CreateAnim() can be called to run the animation.

      Best regards,
      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.
    • Hi,

      Thanks for your reply
      Am calling the functions as below

      flameSprite = GUI_SPRITE_CreateAnim(apbmFlameSprite7,140,122,200,aDelayFlameSprite7,11);

      GUI_SPRITE_StartAnim(flameSprite);

      flameSprite is always zero so my sprite function is failing. What could be the issue?
      Attached is the generated c code for the sprite

      Thanks
      Regards,
      Anuj
      Files
      • sprite.txt

        (166.95 kB, downloaded 357 times, last: )
    • Hi,

      The following call was sufficient to run the animation:

      C Source Code

      1. GUI_SPRITE_CreateAnim(apbmFlameSprite7, 10, 10, 0, aDelayFlameSprite7, GUI_COUNTOF(apbmFlameSprite7));

      The "Period" parameter is 200 instead of 0. The parameter can be used for a fixed period between the images, but it has to be 0 when you pass a pointer to an array of periods, as you did with aDelayFlameSprite7.

      Best regards,
      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.