添加 自定义菜单图标

This commit is contained in:
liufei
2021-07-07 17:28:29 +08:00
parent 9b9d08a594
commit ccd00afbb2
23 changed files with 1489 additions and 107 deletions

View File

@@ -47,6 +47,23 @@ namespace GeekDesk.Util
}
}
/// <summary>
/// byte[]转换成Image
/// </summary>
/// <param name="byteArrayIn">二进制图片流</param>
/// <returns>Image</returns>
public static Image ByteArrayToImage(byte[] byteArrayIn)
{
if (byteArrayIn == null)
return null;
using (System.IO.MemoryStream ms = new System.IO.MemoryStream(byteArrayIn))
{
System.Drawing.Image returnImage = System.Drawing.Image.FromStream(ms);
ms.Flush();
return returnImage;
}
}
/// <summary>
/// 图片base64 转 BitmapImage
/// </summary>