cancel
Showing results for 
Search instead for 
Did you mean: 

animatedImage display issue with TouchGFX

AJT141
Associate III

Hello,

I'm currently developing an application on a STM32H753VT6 with touchGFX and I have an issue with an animatedImage Widget. I want to create a gif with 12 bells images.

The problem is that the bottom of the animation is (sometimes partially) missing as you can see there :

 0693W0000059iijQAA.jpg 

I've already done this animation on another project without any problem but on my main application it doesn't work.

Here is the code creating the animated gif :

animatedImageBell.setXY(0, 0);
animatedImageBell.setBitmaps(BITMAP_CLOCHE00116_ID, BITMAP_CLOCHE00127_ID);
animatedImageBell.setUpdateTicksInterval(NB_TICKS_UPDATE_INTERVALS);
add(animatedImageBell);

and the code to start and stop the animation (I'm not using a loop because the animation is not nice)

if(start_bell_shaking == true)
{
	if(init_start_bell_shaking_done == false)
	{
		// here we replace the bell by the animatedImageBell
		animatedImageBell.setXY(zoomAnimationBell.getX() - OFFSET_BELL_X_POSITION, zoomAnimationBell.getY() - OFFSET_BELL_Y_POSITION); 
		// set animatedImageBell at the same position as zoomAnimationBell)
		zoomAnimationBell.setVisible(false);
		zoomAnimationBell.invalidate();
		box_demo_anim_bell.setVisible(true);
		box_demo_anim_bell.invalidate();
		init_start_bell_shaking_done = true;
	}
	animatedImageBell.stopAnimation();
        // no reverse order, no reset, no loop
	animatedImageBell.startAnimation(false, false, false); 
	start_bell_shaking = false;
}else{
	if(delay_start_bell_shaking == NB_IMAGES_SHAKING_BELL * NB_TICKS_UPDATE_INTERVALS + DELAY_BETWEEN_TWO_SHAKING_BELL_ANIMATION)
	{
		start_bell_shaking = true;
		delay_start_bell_shaking = 0;
	}else{
		delay_start_bell_shaking++;
	}
}

What can cause this issue ?

  

Regards

AJT141

PS : i've enabled cache flush as mentionned in Lab Startup Project Setup PDF document

PS2 : There are no more glitches for the bell when I add a blue box under the bell

1 ACCEPTED SOLUTION
5 REPLIES 5
Romain DIELEMAN
ST Employee

Hi,

In your PS2 you say that putting a box under solved the issue, I assume the bell images had transparency ? Does this fix solve entirely your issue ?

/Romain

Hello,

No transparency for bell images, I just took the 12 images given by the designer of the application.

Yes, adding the box solved the problem but I prefer to find where the problem comes from instead hidding it.

Thanks again,

AJT

Hi,

Could you share your images to see if I can replicate your issue with your code (even if using a different board).

/Romain

Hello,

No problem, here there are. (I've already tried on a STM32H750B-DK without any problem !)

Thks,

AJT