2021-01-11 02:31 PM
TouchGFX seems to mangle all of my .png images. The image is loaded directly into the flash and mapped in BitmapDatabase.cpp. Nothing special going on. Has anyone encountered this or have any troubleshooting ideas?
TouchGFX Designer Screen Capture:
TouchGFX Designer Screen Capture:Target Picture:
Solved! Go to Solution.
2021-01-12 09:49 AM
Looks like the correct answer was to set the image rotation to 90 deg. Thanks @MM..1. I must have missed why this when setting up my Default Image Configuration: https://support.touchgfx.com/docs/development/ui-development/designer-user-guide/config-view#default-image-configuration
Is there any reason why this setting does not automatically attach to Display Orientation in Config -> Display?
2021-01-11 06:09 PM
Hello Jon Enz,
There's a high probability that you didn't configure your Flash correctly.
One other possibility is that the linking is incorrect or you didn't use a correct external loader.
Please verify these points.
Also please provide more information afterwards like software versions used, what MCU, what board, what display, what framebuffer strategy.
For your next posts, please write all this information along with your question to help us answer as quickly and efficiently as possible.
/Alexandre
2021-01-11 09:58 PM
No @Alexandre RENOUX i report this bug here, when you set image angle 90 first build generate fail image, Changing angle twice correct this.
as here png-data does not show properly on the TouchGFX "Run Simulator" (st.com)
Or @ you set bad rotation 0 and need 90
2021-01-12 12:31 AM
Hi,
I have not been able to reproduce this issue. The link you shared did not specify as well the TouchGFX Designer version, it is a good thing to hear that rotating back and forth the image solves the issue but it would be nice if we could fix it directly.
@Jon Enz Could you explain what version of TouchGFX you are using ? As Alexandre said, could you share more information on your setup, framebuffer strategy.
Could you share an example of the struggling png images ? Has this happened to images used in the UI examples and demos available from within TouchGFX Designer ?
/Romain
2021-01-12 09:16 AM
Hi @Romain DIELEMAN , yes reproduce is little complicated, but steps:
1.Create new project in CubeIDE with wizard select for example F429ZIT
2.configure ltdc for RGB666 W600xH800 , this is important source of bug
3.configure touchgfx i use latest 4.16 RGB888 , but issue is long time exist solve all CRC .... generate code
4.open created touchgfx template from IDE , you see config display landscape but default angle for images 0 leave it
5.add canvas IMAGE choice one any rectangle , click RUN SIMULATOR, and image is corrupted
MM.
2021-01-12 09:31 AM
My environment includes:
ExtFlashSection :
{
*(ExtFlashSection ExtFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >FLASH
// 4.15.0 0x2c2e7c8c D2 AY R0 FARGB8888 U888 N0 SExtFlashSection
// Generated by imageconverter. Please, do not edit!
#include <touchgfx/hal/Config.hpp>
LOCATION_PRAGMA("ExtFlashSection")
KEEP extern const unsigned char image_speedreducednotification[] LOCATION_ATTRIBUTE("ExtFlashSection") = // 44x34 ARGB8888 pixels.
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x30, 0xff, 0xff, 0xff, 0x20,
Here is the original .png image:
2021-01-12 09:40 AM
Hmm try check display orientation in touchgfx config, is here landscape or portrait? When landscape set your png to angle 90 not 0.
Second is your quad buff , touchgfx dont support 180 , better for mcu is use rotation over display controller IC, or use two screens one 0 second 180.
2021-01-12 09:49 AM
Looks like the correct answer was to set the image rotation to 90 deg. Thanks @MM..1. I must have missed why this when setting up my Default Image Configuration: https://support.touchgfx.com/docs/development/ui-development/designer-user-guide/config-view#default-image-configuration
Is there any reason why this setting does not automatically attach to Display Orientation in Config -> Display?
2021-01-12 06:14 PM
Hello Jon Enz,
I'm glad you find a way. FYI, since 180 degree screen rotation is done manually, this becomes heavy on the MCU because the entire framebuffer needs to be invalidated all the time. You will not be able to have high level UIs by doing so.
Display Orientation in Config -> Display and Layout Rotation in Config -> Default Image Configuration are linked to each other. It's strange it's not the case for you.
I tried with TouchGFX 4.15 and a project on F746-Disco and whenever I change the display orientation, the layout orientation is automatically modified. Maybe I misunderstood what you were talking about.
/Alexandre
2021-01-13 04:35 PM
The purpose of having the 4 frame buffers is to simplify the rotating so that the framework does not have to completely redraw the assets every time. The framework thinks there is just a normal double framebuffer setup and then the completed frame is manually copied and inverted. It still slows down the app, but what would be rendering effort is instead memcpy operations.