How do I create an icon file that contains multiple sizes?
I know that I create a icon from a bitmap using Icon.FromHandle()
but how do I add another im
This can be done with IconLib. You can get the source from the CodeProject article or you can get a compiled dll from my GitHub mirror.
public void Convert(string pngPath, string icoPath)
{
MultiIcon mIcon = new MultiIcon();
mIcon.Add("Untitled").CreateFrom(pngPath, IconOutputFormat.FromWin95);
mIcon.SelectedIndex = 0;
mIcon.Save(icoPath, MultiIconFormat.ICO);
}
CreateFrom
can take either the path to a 256x256 png or a System.Drawing.Bitmap
object.