Skip to main content
BGuth.1
Senior
March 1, 2022
Solved

How to know if an image is used in TouchGFX

  • March 1, 2022
  • 2 replies
  • 1677 views

A lot of images are uploaded in to my TouchGFX project. I would like to removed unused images from there. How would I know if a particular image is used in the project or not? For example, Texts -> Typographies tab shows how many uses a particular font has. Similarly, is there a way to know if a particular image is used or not?

This topic has been closed for replies.
Best answer by BGuth.1

I tried it again and this time it worked. The only difference is that the project with 4.16.1 grew more than last time. Not sure what the reason was but it worked this time. Thanks.

2 replies

MM..1
Chief III
March 1, 2022

Simply check and search in code every image ID from database. Designer dont count about...

BGuth.1
BGuth.1Author
Senior
March 1, 2022

I thought about this approach. But this is a long and time consuming approach considering number of images in the project. I am trying to see if there is an easier way like the text fonts I mentioned above.

MM..1
Chief III
March 1, 2022

in header file for example

const uint16_t BITMAP_BL1_ID = 0;
const uint16_t BITMAP_BL2_ID = 1;
const uint16_t BITMAP_BLB_ID = 2;
const uint16_t BITMAP_BLW_ID = 3;

comment all out and build

you see errors on used IDs

Alexandre RENOUX
Visitor II
March 4, 2022

Hello BGuth.1,

Are you using the latest version of TouchGFX Designer (4.18.1) ?

Because the number of uses is clearly shown for images as well

0693W00000KbNVuQAN.pngWhen your question is answered, please close this topic by choosing Select as Best.

/Alexandre

BGuth.1
BGuth.1Author
Senior
March 4, 2022

I am using v4.16.1. I tried to migrate to 4.18.1 but encountered problems. Please see https://community.st.com/s/question/0D53W00001KRP0USAX/error-with-touchgfx-conversion-from-4170-to-4181.

I was requested to send the project to you guys. But I am not able to do that. May be you can suggest a solutions based on the information posted in there so far. Please let me know.

Good to know the feature exists in v4.18.1.

Alexandre RENOUX
Visitor II
March 7, 2022

Hello BGuth.1,

The thing is that you must have done something unexpected in your project for the font converter to not work properly when trying to upgrade.

Without a project or details on how you manage text, it's difficult to know what's wrong.

One thing you could do is to delete TouchGFX library folder, generated/ folder, build/ folder and try to upgrade again

Is your project GUI only or hardware related ?

/Alexandre