Files
2025-07-14 12:03:59 +02:00

35 lines
674 B
C#

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);
}
}
}