AnimatedSprite vs AnimatedImage in QML

Viewed 656

In QML I have multiple ways of including animations. Within others there are

  • AnimatedImage
  • AnimatedSprite

which both seem to be of similar use. With the right tools, it is quite easy to transform a sprite sheet into an animated gif or MNG file which could be handled by an AnimatedImage. The other way around is not that much harder.

In the documentation of Sprite they say:

The sprite engine internally copies and cuts up images to fit in an easier to read internal format, which leads to some graphics memory limitations. Because it requires all the sprites for a single engine to be in the same texture, attempting to load many different animations can run into texture memory limits on embedded devices. In these situations, a warning will be output to the console containing the maximum texture size.

On the other hand, the AnimatedImage usually caches the single frames, especially when the animation should loop, (which might also bring the maximum texture size to risk?)

I know that the Sprite has some fancy state machine and stuff, but the AnimatedSprite seems to be stripped of this.

As the production of content for either of those is the same work, I want to know if one of them is superior in any usecase, or whether their usecases and their performance are just entirely the same and which one to use is a question of flavour.

Actually I did not find a single reference that mentioned both in the same context...

0 Answers
Related