Add pre-testing version of the webinterface
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using SixLabors.ImageSharp;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
|
||||
namespace ChatTwo.Util;
|
||||
|
||||
@@ -145,4 +147,11 @@ internal static class IconUtil {
|
||||
return new GfdFileView(new ReadOnlySpan<byte>(Unsafe.AsPointer(ref GfdFile[0]), GfdFile.Length));
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] ImageToRaw(this Image<Rgba32> image)
|
||||
{
|
||||
var data = new byte[4 * image.Width * image.Height];
|
||||
image.CopyPixelDataTo(data);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user