I've got some code that uses MagickImage class.
The code used to work (I thought) so obviously something's changed, and I'm trying to troubleshoot the problem...
My code looks like this:
Code: Select all
MemoryStream ms = null;
MagickImage image = new MagickImage(data, readSettings);
image.Format = MagickFormat.Bmp;// Png;//Bmp3;
ms = new MemoryStream();
image.Write(ms);
image.Dispose(); image = null;
byte[] result = ms.GetBuffer();
ms.Dispose();
image.Write(ms);
the ms.Length is 0 even though the image is 2495x3501
No exception is thrown
Any ideas?
Thanks
Martin