I did find nothing for unity3d since most converters involve system.drawing.
And yes i dont like really like posting in the unity forum so i post only if i find nothing.
So google shows with the search “Unity3d Convert .ico to .png” only about 12 results to me and only the first 3 results are relevant. On that three results that question was asked but the answer was only “people convert it normally with an external program”
“unity read ico file” gives me far more results but only 2 relevant. And no one answers that.
And if i use google later again with that same question i will have one more result with the answer being “use google”.
If you have to do it in runtime and you can’t depend on system.drawing, I would consider just writing a reader myself, the file format is fairly short and simple. It’s just a set of uncompressed images, with the exception of png compression on the 256x256 full color version.
To convert to and from png, Unity has some built in functions.
Unity does not seem to have System.Drawing included, atleast using System.Drawing does not seem to be available in unity projects. Is there a trick to get it or is it not implemented?
For writing a reader i have not even an idea how to get started i have never done direct image conversions and to research the right code might take a while.
I know this is the opposite of what was originally asked, but it’s not too hard to adapt the code to do the reverse and read the data in an .ico file (without relying on System.Drawing.dll).
In case anyone comes across this in the future:
I’ve looked into the whole thing a bit more. It seems implementing reading and writing of .ico files yourself is not as straight-forward as I initially thought. If you only care about Windows, definitely use System.Drawing and be done with it.
For anyone that wants to do this on other platforms as well (WebGL, Android, etc.) I’ve released a cross-platform utility for reading and writing .ico files in the Asset Store, which is currently also on sale.