check point
This commit is contained in:
35
framework/Inspectron.Camera/Image/BitmapImage.cs
Normal file
35
framework/Inspectron.Camera/Image/BitmapImage.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
namespace Inspectron.Camera.Image
|
||||
{
|
||||
public class BitmapImage : IImage
|
||||
{
|
||||
private readonly Bitmap _bitmap;
|
||||
|
||||
public BitmapImage(Bitmap bitmap)
|
||||
{
|
||||
_bitmap = bitmap;
|
||||
}
|
||||
|
||||
public int Width => _bitmap.Width;
|
||||
|
||||
public int Height => _bitmap.Height;
|
||||
|
||||
public int Channels => throw new System.NotImplementedException();
|
||||
|
||||
public Bitmap Bitmap => (Bitmap)_bitmap.Clone();
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Save(string path)
|
||||
{
|
||||
_bitmap.Save(path,ImageFormat.Bmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user