plugin system docs
custom buttons for plugins calibration functions for Leeform
This commit is contained in:
13
Plugins/LindtLeerformPlugin/Services/ImageConverter.cs
Normal file
13
Plugins/LindtLeerformPlugin/Services/ImageConverter.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using OpenCvSharp;
|
||||
|
||||
namespace LindtLeerformPlugin.Services;
|
||||
|
||||
public static class ImageConverter
|
||||
{
|
||||
public static Avalonia.Media.Imaging.Bitmap MatToAvaloniaBitmap(Mat mat)
|
||||
{
|
||||
var encoded = mat.ImEncode(".bmp");
|
||||
using var ms = new MemoryStream(encoded);
|
||||
return new Avalonia.Media.Imaging.Bitmap(ms);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user