@magorium
That's a useful little icon utility.
If interested then simply request a platform and i'll see what i can do (in which case it will not be an official release though and would be meant for internal usage only as the tool is not finished yet). For source-code feel free to pm me.
The problem with Templates.info is what I call the icon attribute tag values such as for first image, second image, etc. AROS icon library uses ABADCAFE. Ilbmtoicon uses a numeric value. But this icon file uses an unusual value.
It can still be evaluated correctly using the rule - if it is equal to 0 then it is 0. If it is not then it's 1. And 1 means the data is present. The solution is to remake the icon file with the correct icon attribute tag values.
The 'problem' with those tags/properties is that when the icon is actually loaded into memory that these tags/properties point to real memory locations where the data is actually stored.
Thus, indicating that the pointer is actually pointing toward valid data.
But, we can't actually use the original pointer values in an icon file stored on disk as the memory location where the data was loaded has no relation to the location as stored in the icon file.
One could perhaps argue that in such case it would have been nicer to let those pointers point to the actual offset in the icon file (or something to that extend) and some programs actually do something like that, but afaik that is not officially documented, nor is there any consensus on how to do that in a info file and last but not least the info file format is complicated enough as it is
So, any value other then 0 means data is (or should be) present and when the icon is actually loaded these values should be replaced by values of their loaded/allocated memory location.Storing an icon file simply requires to do all this in the opposite way.
Not having understood the entire problem I am a bit surprised that some programs seem to 'choke' on certain icons as the available specifications seem clear enough to me. On the other hand, that is easy for me to say because after having tested over 100.000 info files i have only managed to come across one defected icon file (and for the life of me I seem unable to figure out how to detect/handle it properly: the info file indicates that there should be data present while it actually isn't present in the file so my (pre)calculations of the info file size seem to go wrong somewhere (thus removed again from my code until further notice
)).
I apologize for letting the thread slide away a bit from the original topic. Any request/question/discussion specifically about my tool ii can be made in its own separate thread.