I am trying to save a large image (2048 x 2048 pixels) from a C# software to the filesystem using the emgu cv library:
var mat = new Mat( pathToFile, ImreadModes.GrayScale );
mat.Save( "imagename.png" );
The second line of the code snippet throws an exception with the message
System.ArgumentException: Parameter is not valid. at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, Int32 stride, PixelFormat format, IntPtr scan0)
I found out, that the size of the image can be a problem, when the save() function creates a bitmap.
What other possibilites do you suggest, to save the Mat-image onto the filesystem?
Note that I the Image is not already stored in the filesystem as my code snippet implies. I am receiving it from a camera.