mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
added image converter class to get ico from resources (get rid of redundant image resources)
This commit is contained in:
19
mRemoteNG/Resources/ImageConverter.cs
Normal file
19
mRemoteNG/Resources/ImageConverter.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace mRemoteNG.Resources
|
||||
{
|
||||
class ImageConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Draws an Icon from a Bitmap
|
||||
/// </summary>
|
||||
/// <param name="SVGString"></param>
|
||||
/// <returns></returns>
|
||||
internal static Icon GetImageAsIcon(Bitmap bitmap)
|
||||
{
|
||||
var icon = Icon.FromHandle(bitmap.GetHicon());
|
||||
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user