namespace Pilz.UI.Extensions;

public static class ImageExtensions
{
    public static Icon? ToIcon(this Image image)
    {
        if (image is Bitmap bmp)
            return Icon.FromHandle(bmp.GetHicon());
        return null;
    }
}