13 lines
248 B
C#
13 lines
248 B
C#
using System.Drawing;
|
|
|
|
namespace Pilz.UI;
|
|
|
|
public static class Extensions
|
|
{
|
|
public static Image? ToIcon(this Image image)
|
|
{
|
|
if (image is Bitmap bmp)
|
|
return Icon.FromHandle(bmp.GetHicon());
|
|
return null;
|
|
}
|
|
} |