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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

  • Hi,

    The following call was sufficient to run the animation:

    C
    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: https://www.segger.com/ticket/

    Or you can contact us via e-mail.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!