Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Image Fails to Save (Read 1275 times)
MindFusionUser47
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Location: Illinois
Joined: Jan 23rd, 2018
Image Fails to Save
Nov 4th, 2019 at 4:33am
Print Post  
Are there reasons an image would fail when trying to save? The error message is "parameter not valid".

Image image = diagram.CreateImage();
image.Save(filename + ".png", ImageFormat.Png);
image.Dispose();

The code fails at the Save part

« Last Edit: Nov 5th, 2019 at 5:12am by MindFusionUser47 »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Image Fails to Save
Reply #1 - Nov 4th, 2019 at 6:17am
Print Post  
The bitmap size might be reaching some limit of GDI+, or specifically of the PNG encoder. You could export a scaled down bitmap or split into smaller bitmaps, or otherwise use different formats like SVG or PDF.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint