Add pre-testing version of the webinterface

This commit is contained in:
Infi
2024-08-24 03:05:33 +02:00
parent 117d9fc45c
commit 5e93732183
27 changed files with 1498 additions and 129 deletions
+9
View File
@@ -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;
}
}