2022-03-01 08:02 AM
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?
Solved! Go to Solution.
2022-03-07 07:04 AM
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.
2022-03-01 09:40 AM
Simply check and search in code every image ID from database. Designer dont count about...
2022-03-01 09:43 AM
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.
2022-03-01 10:19 AM
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
2022-03-03 09:30 PM
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
When your question is answered, please close this topic by choosing Select as Best.
/Alexandre
2022-03-04 06:33 AM
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.
2022-03-04 07:52 AM
I check this in 4.18.1 and counted is only images used in designer. I have many images used from code and show Uses zero.
2022-03-06 06:14 PM
Hello MM..1,
You are correct, and I'm glad you mentioned it since it could also be mentioned by other people ^^
The Designer does not read your user code so it is normal that the number of uses from code is not recognized by the Designer.
Best regards,
Alexandre
2022-03-06 06:22 PM
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
2022-03-07 07:04 AM
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.