Kostas
When you save the chart image to the MemoryStream and Flush it I believe that the MemoryStream pointer is at the end of stream, so I think you need to set the MemoryStream pointer back to the beginning of stream with Seek before you call Image.FromStream( ).
MemStream.Flush();MemStream.Seek(0, SeekOrigin.Begin);Image ChartImage = Image.FromStream(MemStream);
Please let us know if this solution works for you.
Regards,
No, this did not work, same exception.What I found out though is that when I export the chart with a Png image format by calling:MyChart.SaveTo(MemStream, System.Drawing.Imaging.ImageFormat.Png);instead of MyChart.SaveTo(MemStream, System.Drawing.Imaging.ImageFormat.Jpeg); the export succeeds.
Actually the Png image format is the only one that succeeds. Maybe this has something to do with the image having transparent items like legends ect.