Skip to main content
Senior
May 15, 2025
Solved

DynamicBitmapCreateExternal() for RGB565

  • May 15, 2025
  • 3 replies
  • 1462 views

Hi, I am creating a DynamicBitmapCreateExternal() for RGB565, but the image shows up faded. Is there any fix for this? I made sure to set cache for it. I also tried for L8 and it didn't show.

Best answer by Priyank

I just tried with RGB888 and it worked.

3 replies

GaetanGodart
Technical Moderator
May 19, 2025

Hello @Priyank ,

 

If the image looks faded / pastel color / lighter color, perhaps it is a color format issue.

Can you please share more information with us?

Are you able to make a "regular" DynamicBitmap work?

Can you share your code and images of the result and expected result?

 

Regards,

Gaetan GodartSoftware engineer at ST (TouchGFX)
PriyankAuthor
Senior
May 19, 2025

Yes, it works with regular dynamic bitmap.

FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
 : FrontendApplicationBase(m, heap)
{
	static uint16_t cacheSize[512];
 Bitmap::setCache(cacheSize, sizeof(cacheSize),1);
}
void LandingView::setupScreen()
{
bmpId = Bitmap::dynamicBitmapCreateExternal(146, 36,(void*)0x90FC0000, Bitmap::RGB565);
logo.setBitmap(Bitmap(bmpId));
add(logo);
logo.setXY(20,20);
}

 The address is where I have the image stored (QSPI). This code worked when using a regular bitmap cache and dynamic bitmap create. Logo here is a Image widget.

ST Employee
October 13, 2025

Hello @Priyank.

The issue has been fixed in TouchGFX 4.26.0.

JohanAstrup_0-1760334866539.png

Best regards,
Johan

 

PriyankAuthor
Senior
October 23, 2025

Hello, @GaetanGodart @JohanAstrup   

I've run the same tests under TouchGFX 4.26.0, but I still run into the issue of the image looking grainy/faded. Does stm32cubeIde also need to be updated? I am running that on an older version (1.16.1)

 static uint16_t cacheSize[512];
 Bitmap::setCache(cacheSize, sizeof(cacheSize),1);
 volatile BitmapId bmpId = Bitmap::dynamicBitmapCreateExternal(185, 43,(void*)image_logo, Bitmap::BitmapFormat::RGB565);

 

ST Employee
November 14, 2025

Hello @Priyank.

You do not have to update STM32CubeIDE.
Instead, try deleting the ST folder in the Middlewares folder and then regenerate code in TouchGFX Designer.

Best regards,
Johan