Get icon files in Unity
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
test.png
(1.0 kB)
Comment
Your answer
Follow this Question
Related Questions
Unity 3D API for Windows Form like OpenTK 0 Answers
.NET Standard 2.0 - Windows Registry - works on Mac OS X 1 Answer
OSX - using System.Drawing 0 Answers