2024-03-20 02:21 AM - edited 2024-04-01 04:09 AM
Hey!
When I use images in TouchGFX, the color sequence seems different than in regular widgets. It only appears when images are stored on external flash (QSPI flash in my case), images stored on internal flash are fine.
Below is an example: the top 3 squares are BOX widgets, the bottom 3 are images in .png format.
In TouchGFX:
IRL:
I'm driving RGB display with LTDC module. I'm using the ARGB pixel format, so the pixels are aligned at 32 bits:
Also I tried to fill framebuffer manually with pixels to verify their colors and everything showed as expected:
const uint32_t colors[8] = {
0xFFFF0000, // Red
0xFF00FF00, // Green
0xFF0000FF, // Blue
0xFFFFFF00, // Yellow
0xFFFF00FF, // Magenta
0xFF00FFFF, // Cyan
0xFF000000, // Black
0xFFFFFFFF // White
};
What setting am I missing?
Solved! Go to Solution.
2024-03-26 04:26 AM - edited 2024-04-01 04:08 AM
Thanks for the reply. The problem dissapeared, but I'm not sure how. I'm guessing this is due to a mismatch between the pixel format settings in CubeMX and TouchGFX here:
2024-03-22 04:27 AM
Hello @VL.3 ,
The settings you are using look correct, and, it is interesting that the colors of the images are shown accurately, it seems like the images have shifted to left (so, the red one has become blue, the blue one green, and the green one red). Does this color exchange happen if you use only a single image with multiple colors in it?
Could you please share the linker script that you are using?
Thank you
2024-03-26 04:26 AM - edited 2024-04-01 04:08 AM
Thanks for the reply. The problem dissapeared, but I'm not sure how. I'm guessing this is due to a mismatch between the pixel format settings in CubeMX and TouchGFX here:
2024-04-02 12:23 AM
Okay, good to hear that the problem is resolved.
Could you please mark your answer as the solution?