cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Color sequence with .png images from ExtFlashSection

VL.3
Associate III

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:

Screenshot (24).png

IRL:

ph.jpg

I'm driving RGB display with LTDC module. I'm using the ARGB pixel format, so the pixels are aligned at 32 bits:

Screenshot (25).png

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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:
Screenshot (26).png

View solution in original post

3 REPLIES 3

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

Mohammad MORADI
ST Software Developer | TouchGFX

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:
Screenshot (26).png

Okay, good to hear that the problem is resolved. 
Could you please mark your answer as the solution? 

Mohammad MORADI
ST Software Developer | TouchGFX