I'm trying to get icon files on a project oriented for windows only.
I'm using system.Drawing. The dll has been included from a csc.rsp file:
-r:System.drawing.dll
Works fine without errors and can be compiled also.
But I obtain always an empty image;
Here is the code:
![public class SaveIcons : MonoBehaviour
{
void Start()
{
Icon appIcon = Icon.ExtractAssociatedIcon("C:\\Users\\Arrasss\\Pictures\\dexwallpapers\\ac96ba3b4338dafc2244757021992163-1000.jpg");
System.Drawing.Image MyIMG = appIcon.ToBitmap();
MyIMG.Save("test.bmp");
}
}][1]
You can see on the image what I always get.
what I'm doing wrong?
[1]: /storage/temp/173149-test.png
↧