check point

This commit is contained in:
meelstorm
2025-07-14 12:03:59 +02:00
commit d3cb790bd9
431 changed files with 44078 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
namespace Inspectron.Camera.Image
{
public static class Extensions
{
public static ByteImage ToByteImage(this Bitmap self,int channels)
{
MemoryStream ms = new MemoryStream();
var bmp = self;
bmp.Save(ms, ImageFormat.Bmp);
ByteImage bi = new ByteImage(bmp.Width, bmp.Height, channels, ms.ToArray(), bmp.Width);
return bi;
}
}
}