Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Vision for NET
»
Nevron Chart for .NET
»
ArgumentException is thrown when trying to create an Image from the...
ArgumentException is thrown when trying to create an Image from the stream produced by ImageExporter...
Post Reply
ArgumentException is thrown when trying to create an Image from the...
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Irina
Irina
posted 9 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 23,
Visits: 306
Hello,
I need to export a chart control to EMF image without saving it to a file. The following code fails with System.ArgumentException when Image.FromStream is called.
var memoryStream = new MemoryStream();
nChartControl1.ImageExporter.SaveToStream(memoryStream, new NSize(500, 500), NResolution.ScreenResolution, new NEmfImageFormat());
var image = Image.FromStream(memoryStream);
What is the cause of the exception and how it can be prevented?
Thank you
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
ArgumentException is thrown when trying to create an Image from the...
Irina
-
9 Years Ago
Hi Irina, You need to move the current position in the stream to its...
Nevron Support
-
9 Years Ago
The suggested approach works.Thank you!
Irina
-
9 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search