cancel
Showing results for 
Search instead for 
Did you mean: 

Repeated images in animation

KNara.2
Associate III

Hi All,

Is there a way to avoid repeated images in animation?

To be more specific lets say I have animation to be created with 6 .png images and lets say my first 2 images and last 2 images are  the same...Is there a way to reuse the same images (1.png and 2.png ) instead of repeating the copy of the images ?
As of now I'm simply naming the images as 1.png 2.png 3.png 4.png 5.png(copy of 2.png) and 6.png(copy of 1.png).

 

Can I eliminate the 5 and 6 and reuse 1 and 2?
How can I make it more efficient?

 

Thanks & Regards,

2 REPLIES 2
MM..1
Chief II

Why not, create animation in your user code ... Animated Image | TouchGFX Documentation

 

animatedImage.setBitmaps(BITMAP_BUTTERFLY_01_ID, BITMAP_BUTTERFLY_72_ID);

 

 

then seems must be manipulated IDs database manualy... Designer dont have inteligent solution for this.

GaetanGodart
ST Employee

Hello @KNara.2 ,

 

There is no inherent way to do that.

However, you could simple go into the code and loop back the animation with the methods we provide or do almost anything for that matter.
Alternatively, if I had to do that myself, I would add 2 animated images, one for the animation from image 1 to image 4 and one from image to image 1, the start of the second animated image is triggered by the end if the first animated image, this allows you to have your expected behavior without having copies of your images, in that case you simple reuse the same image but in another animated image.

 

If one of the comments helped you, I invite you to select it as "best answer". :smiling_face_with_smiling_eyes:

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)