2021-08-20 12:29 AM
An example would be having a pixel color of #0000FF(R = 0, G = 0, B = 255) in TouchGFX designer to be displayed on the physical lcd screen as #FF0000 (R = 255, G = 0, B = 0). I have tried the methods below:
Please let me know I am doing something wrong or if there are any methods to perform the red blue swap. Thanks!
2021-09-09 01:44 AM
Hi,
Unfortunately TouchGFX does not have a library patch that swaps the colors. We can only write the framebuffer in RGB order. The LTDC does not allow swap either (would require to swap the wires). A solution would be to use an extra framebuffer and then use DMA2D to copy from RGB565 to BGR565. This would require extra memory and might impact performances. You could also use the partial framebuffer strategy where you first draw in the partial framebuffers in the normal RGB565 mode. When a buffer is full you copy that buffer to a real framebuffer using DMA2D, and then have the LTDC read from that real framebuffer.
/Romain