2025-05-08 7:07 AM
Hi, I am trying to create an external dynamic bitmap to display an image already loaded into Memory Mapped External Flash.
uint16_t FrontendApplication::getLogoBitmapId()
{
if (bitmapId == touchgfx::BITMAP_INVALID)
{
bitmapId = Bitmap::dynamicBitmapCreateExternal(185, 43,(void const*)0x90FC0000, Bitmap::RGB565);
}
return bitmapId;
}
void LandingView::setupScreen()
{
LandingViewBase::setupScreen();
auto app = static_cast<FrontendApplication*>(Application::getInstance());
uint16_t bmpId = app->getLogoBitmapId();
logo.setBitmap(Bitmap(bmpId));
add(logo);
logo.invalidate();
}
I keep getting the bitmapId as BITMAP_INVALID. I've tried the external bitmap function with L8 as well.
2025-05-09 2:08 AM - edited 2025-05-09 2:36 AM
2025-05-12 6:31 AM
The description of the function says that is allows the user to create a dynamic bitmap without needing to use the cache so I did not.
"Create a dynamic bitmap without reserving memory in the dynamic
* bitmap cache. The pixels must be already available in the
* memory, e.g. in flash. No copying is performed."
2025-05-13 4:30 AM
You still need the setCache, it's use to store your image adress/size.
BR,
2025-05-13 12:59 PM
Gotcha, I set the cache, but for RGB565 images, the image shows up faded. For L8 Images, they don't appear at all?