I am trying to convert a byte array to an image. There are many references on the web to do so such as this SO post and this emgu forum and emgu official docs.
However I am getting an error when I implement the solutions according to the SO post and the Emgu docs that reads
Cannot convert from System.Drawing.Bitmap to byte[*,*,*,*]
public Image<Bgr, Byte> CreateImageFromBytesArray(byte[] bytes)
{
using (var ms = new MemoryStream(bytes))
{
Bitmap bmp = new Bitmap(ms);
Image<Bgr, Byte> img = new Image<Bgr, Byte>(bmp); //EXCEPTION HERE
return img;
}
}
Any suggestions on how to make this work?