mirror of
https://github.com/recroom2016/OpenRec-Launcher.git
synced 2026-04-22 13:55:53 +00:00
Add project files.
This commit is contained in:
27
Launcherapi/Images.cs
Normal file
27
Launcherapi/Images.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenRec2.Launcherapi
|
||||
{
|
||||
internal class Images
|
||||
{
|
||||
|
||||
//to be able to read image files as images in gui
|
||||
public static Image bytearraytoimage(byte[] source)
|
||||
{
|
||||
try
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(source);
|
||||
Image ret = Image.FromStream(ms);
|
||||
return ret;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user