2

According to the documentation (https://developer.garmin.com/connect-iq/programmers-guide/resource-compiler/) the resource compiler supports GIF as Bitmap. However, when I display a GIF file, I just get a still picture, and the GIF doesn't move.

The GIF I have been testing with is this: http://bestanimations.com/Animals/Mammals/Cats/cats/cute-kitty-animated-gif-2.gif and I have saved the gif in the drawables folder (I use the ConnectIQ-plugin for Eclipse).

I have tried to include the Bitmap in the layouts resources as:

<layout id="MainLayout">
    <bitmap id="MotivatorCat" x="center" y="center" filename="../drawables/motivatorcat.gif"/>
</layout>

and I have tried to include it in the drawables resources as:

<drawables>
    <bitmap id="MotivatorCat" filename="motivatorcat.gif" />
</drawables>

and then loading it in initialize() by:

catgif = Ui.loadResource(Rez.Drawables.MotivatorCat);

and drawing it in onUpdate():

dc.drawBitmap(50, 50, catgif);

But nothing works.

What am I doing wrong?

user129954
  • 131
  • 5

1 Answers1

1

The Connect IQ does not currently (as of SDK 2.1.x) support rendering of animated GIF images.

douglasr
  • 1,894
  • 1
  • 23
  • 29
  • Thanks for the answer. I see that you have changed it from your original answer which was pretty much a rewrite of what I had already written in the question description - about the two things I had tried to do. I don't see why my question is down voted though. I think one of the big advantages of a GIF is that it supports animations, so it would be reasonable to think that the Connect IQ would support animated GIFs when the documentation says that it supports GIFs. Anyway, I have now made my own animation with a series of updates to the view with different pictures. – user129954 Dec 01 '16 at 19:15
  • I didn't vote your question down so I'm not sure. I changed my answer because your original question title (before I edited it) didn't mention the fact that you were trying to animate the image and I missed that. – douglasr Dec 08 '16 at 16:42