public void Read(Bitmap bitmap)
{
Throw.IfNull(nameof(bitmap), bitmap);
using (MemoryStream memStream = new MemoryStream())
{
if (IsSupportedImageFormat(bitmap.RawFormat))
bitmap.Save(memStream, bitmap.RawFormat);
else
bitmap.Save(memStream, ImageFormat.Bmp);
memStream.Position = 0;
Read(memStream);
}
}