2024-11-13 04:28 PM
I am having an issue adding a bitmap into my project, its ID doesn't seem to get added into the bitmap database, but in debugging this I noticed that there is a bunch of info from a bunch of bitmaps that got deleted from the project long ago.
I go into images, hit +, point the file picker at my .png file, add it in, looks great, put in a screen, looks great. Generate code, compile the code, compiler can't resolve the symbol for the bitmap ID. Grr.
Maybe I just don't understand how these files work, but they do say that I should not edit them since they are generated by imageconverter. I expect that the database is borked, but if I delete it, and generate code, that makes a bigger mess. Apparently there is a trick that I don't know.
Okay, how do I fire up imageconverter so that my bitmap gets an ID and the old stuff gets deleted?
(4.24.1)
Solved! Go to Solution.
2024-11-14 12:58 PM
I got it! You won't believe this.
When Designer was generating the assets it was tripping over the Thumbs.db file in assets/images and not altering any assets in the generated/images folder. (The images folder holds the .cpp/.hpp files for the converted image bitmaps.)
If I blow away the Thumbs.db file, make a trivial change to my screen, and regenerate the code, now I can see that the previous image files and data are removed and my new bitmaps get incorporated.
Microsoft lets us know that the Thumbs.db files (hidden) are regenerated automatically if they are removed, so I guess ST will have to deal with those in imageconverter.
Thanks for your help.
2024-11-14 08:07 AM - edited 2024-11-14 08:26 AM
Hi@Andrei Chichak ,
try to delete the whole folder
\TouchGFX\generated
and build application again in GfxDesigner. What you describe seems similar to what I experienced few times. It seems the Designer sometimes gets confused and it needs to start from scretch.
2024-11-14 11:51 AM - edited 2024-11-14 11:53 AM
Unfortunately no. When it regenerated, the previous cruft was regenerated as well.
Plus it didn't generate a new images folder. Sigh.
But thanks for the idea.
2024-11-14 12:20 PM
"it didn't generate a new images folder"
Hm, not sure what folder that might be. From my experience, with nothing else changed, generated content of this folder is always the same. It should be, right ?
2024-11-14 12:28 PM
"I noticed that there is a bunch of info from a bunch of bitmaps that got deleted from the project long ago"
Maybe some problem with this folder ?
TouchGFX\assets\images\__generated
2024-11-14 12:39 PM
Could be that the compiler object *.o files are not deleted ?
2024-11-14 12:58 PM
I got it! You won't believe this.
When Designer was generating the assets it was tripping over the Thumbs.db file in assets/images and not altering any assets in the generated/images folder. (The images folder holds the .cpp/.hpp files for the converted image bitmaps.)
If I blow away the Thumbs.db file, make a trivial change to my screen, and regenerate the code, now I can see that the previous image files and data are removed and my new bitmaps get incorporated.
Microsoft lets us know that the Thumbs.db files (hidden) are regenerated automatically if they are removed, so I guess ST will have to deal with those in imageconverter.
Thanks for your help.
2024-11-14 02:15 PM
Very interesting, thanks for sharing. See it. Say it. Sorted. Perfect world.
2024-11-15 01:00 AM
Hello @Andrei Chichak ,
When you say "the compiler can't resolve the symbol for the bitmap ID", I assume you get an error message, could you share it please?
If you create a new project, are you able to reproduce the issue? If you can, what are the steps to reproduce it?
To fire up imageconverter, you can check this .
Regards,
2024-11-15 10:20 AM
I'm attempting to reproduce the issue with a new project. It SHOULD blow up, but I have to wait for Windows (10) to create the Thumbs.db file.
FYI, overnight Windows created the Thumbs.db file in my original project's folder and this morning the problem is back, as we can see:
Generate Assets
make -f simulator/gcc/Makefile assets -j8
Reading ./application.config
Reading ./target.config
ERROR: assets/images/Thumbs.db not supported by image converter
generated/simulator/gcc/Makefile:221: recipe for target 'images' failed
make[1]: *** [images] Error 1
make[1]: *** Waiting for unfinished jobs....
simulator/gcc/Makefile:32: recipe for target 'assets' failed
make: *** [assets] Error 2
Failed
I'll give more information when I can get the issue to appear in a new project, but for now I can say that this shouldn't happen if you are using Linux for your test system. Thumbs.db is a Windows system file, not Linux, not MacOS.