코딩Coding/C#
C# png파일 ico으로 바꾸기
내인생PLUS
2023. 8. 24. 07:45
728x90
using System.Drawing;
{
FileStream stream = File.OpenWrite(@"C:\Temp\test.ico")
Bitmap bitmap = (Bitmap)Image.FromFile(@"C:\Temp\test.png");
Icon.FromHandle(bitmap.GetHicon()).Save(stream);
}
https://stackoverflow.com/questions/8381455/converting-png-to-ico-in-c-c
converting .PNG to .ICO in C/C#
I want to convert .PNG files to .ICO files. I want to do it locally with out any internet dependency (so I can't use online tools like converttoico.com etc). I found a wonderful tool called png2ic...
stackoverflow.com
https://gist.github.com/darkfall/1656050
A simple class that converts a image to a icon in c# without losing image color data, unlike System.Drawing.Icon; ico with png d
A simple class that converts a image to a icon in c# without losing image color data, unlike System.Drawing.Icon; ico with png data requires Windows Vista or above - gist:1656050
gist.github.com
반응형