Hello,
to display bitmaps on a screen I've successfully used the functions GUI_DrawBitmap() with pre-converted *.bmp files into c structures with the ST Bitmap Converter for STM32 GUI applications.
So the converted bmp files into c structures look like:
Display All
Now I want to change the pixel data of this structure (_acCustomer_Logo[]) without changing the bitmap dimensions, bits per pixels, etc. reading another file (with the same dimensions and no compression) from a USB/SD card while the application is running (the bitmap will be stored in a different memory area than the application).
Is there any way / example code to convert directly a bitmap file into the emWin c structures without using the Bitmap converter?
I've tried to read the individual pixels and manually overwrite the structure but I get corrupted data (dirty pixels), maybe I'm missing something regarding the conversion the bitmap converter is doing.
Thank you for your support.
Mark
to display bitmaps on a screen I've successfully used the functions GUI_DrawBitmap() with pre-converted *.bmp files into c structures with the ST Bitmap Converter for STM32 GUI applications.
So the converted bmp files into c structures look like:
Source Code
- extern GUI_CONST_STORAGE GUI_BITMAP bmCustomer_Logo;
- static GUI_CONST_STORAGE unsigned char _acCustomer_Logo[] = {
- 0xFF,0xFF,0xFF,...
- }
- GUI_CONST_STORAGE GUI_BITMAP bmCustomer_Logo =
- {
- 360, // xSize
- 120, // ySize
- 1080, // BytesPerLine
- 24, // BitsPerPixel
- (unsigned char *)_acCustomer_Logo, // Pointer to picture data
- NULL, // Pointer to palette
- GUI_DRAW_BMPA565
- };
Now I want to change the pixel data of this structure (_acCustomer_Logo[]) without changing the bitmap dimensions, bits per pixels, etc. reading another file (with the same dimensions and no compression) from a USB/SD card while the application is running (the bitmap will be stored in a different memory area than the application).
Is there any way / example code to convert directly a bitmap file into the emWin c structures without using the Bitmap converter?
I've tried to read the individual pixels and manually overwrite the structure but I get corrupted data (dirty pixels), maybe I'm missing something regarding the conversion the bitmap converter is doing.
Thank you for your support.
Mark