cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Image Mangling

Jon Enz
Associate III

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:

0693W000007Aq1YQAS.pngTouchGFX Designer Screen Capture:0693W000007Aq1nQAC.pngTarget Picture:0693W000007Aq1xQAC.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Jon Enz
Associate III

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?

View solution in original post

9 REPLIES 9
Alexandre RENOUX
Principal

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

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

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

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.

My environment includes:

  • TouchGFX 4.15
  • Firmware Package STM32Cube FW_H7 V1.6.0
  • Target: STM32H753 with 480*272 display
  • Quadruple Framebuffer (Double framebuffer with corresponding inverted framebuffers for 180 deg screen rotation.)
    • 0693W000007AzMVQA0.png
  • Images are marked for ExtFlashSection, but that is currently being loaded into the normal flash area. It appears to be loaded correctly.
  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,

0693W000007AzWkQAK.png 

Here is the original .png image:0693W000007AzXTQA0.png

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.

Jon Enz
Associate III

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?

Alexandre RENOUX
Principal

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

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.