cancel
Showing results for 
Search instead for 
Did you mean: 

1bit mode white color bug

DM?�l.11
Associate II

Hi, i discovered wierd behavior for touchgfx when using 1bit mode (BW or BW_RLE).

Issue happens when you place black color on white one, then in editor everything looks normal but in simulator and on the board the white color overlays the black one. For example when you have white background and black square in the middle, only white background is displayed (opposite works fine).

I am attaching touchgfx project where you can reproduce this issue.

I am using touchgfx 4.10.0

4 REPLIES 4

Hi @Dominik Müller​,

Thank you for reporting this issue. I have passed it on to the development team.

As a workaround for this bug, may i suggest you create an image of the navigation wheel and use that instead?

/Anders

Hi @Dominik Müller​,

I have a fix for this issue:

In touchgfx/framework/source/touchgfx/widgets/canvas/PainterBW.cpp line 46 change:

unsigned pixel = painterColor << (7 - (x % 8));

to

unsigned pixel = 1 << (7 - (x % 8));

Then ensure to add touchgfx/framework/source/touchgfx/widgets/canvas/PainterBW.cpp to you compilation.

Fix will be included in the next version of TouchGFX.

Thanks for reporting!

/Anders

DM?�l.11
Associate II

Hi,

thank you for your quick response!

I have tried to apply your fix and now it's working as expected.

AAlis.23
Associate III

Hi,

I saw your post regarding the issue with TouchGFX in 1-bit mode where image widgets appear black. You mentioned that you resolved the problem, but I’m having trouble with the same issue.

I tried modifying the file, but I can’t seem to get it to recompile. I believe the system might be using the precompiled library instead of recompiling the source files. Do you have any advice on how to ensure the modified files are being recompiled?

Also, since your post is a few years old, I’m wondering why this issue still doesn’t seem to be resolved in the latest versions. I’ve described my issue in full on StackOverflow here: https://stackoverflow.com/questions/79475240/touchgfx-bw-1-bit-mode-load-image-fails-bug.

Any insight would be greatly appreciated. Thank you!