Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Saving & Copying images (Read 2796 times)
jstraylor
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 50
Joined: Dec 28th, 2006
Saving & Copying images
Jan 23rd, 2008 at 1:41pm
Print Post  
Good day,

We are still using FC.Net 4.3.1 and are having a problem with images applied to boxes.  In some cases we have a need to copy our current flowchart to a new flowchart for printing and archiving purposes.

We use (somthing like) newFC.fromstring(oldFC.tostring())  (I can't recall the exact syntax, but that should convey the essence)

Images attached to boxes in the oldFC are not showing up in the newFC.

BTW, this does not seem to happen if the attached image comes from the app.resources.  (specifically a GIF or an ICO)


Any ideas or suggestions would be welcome,
Jeff
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Saving & Copying images
Reply #1 - Jan 23rd, 2008 at 1:49pm
Print Post  
Good day,

That happens if you load a node image from a stream and close the stream before calling FlowChart.Save(). You can see a "You must keep the stream open for the lifetime of the Image" remark in the MSDN article for Image.FromStream. If the original image stream is closed, the Image.Save() method fails when Flowchart.NET calls it while serializing the chart.

Stoyan
  
Back to top
 
IP Logged
 
Bjorn
YaBB Newbies
*
Offline


Alfadata Technologies
Corporation

Posts: 33
Location: Alberta
Joined: Aug 14th, 2008
Re: Saving & Copying images
Reply #2 - Sep 30th, 2011 at 6:20pm
Print Post  
Thank you for the reply.  We have images that are application resources that are causing this issue as well as ones that are loaded from stream.  It also seems to happen with various image formats.
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Saving & Copying images
Reply #3 - Sep 30th, 2011 at 7:22pm
Print Post  
Actually we fixed this specific issue a few years ago (Image.Save not working if the original stream was closed), by reencoding the image as Bmp if saving its original bytes fails. Later we noticed the transparent background is lost, as per your previous post, and started reencoding to Png when saving to binary format, but it seems we have omitted doing this for Xml. Our developer will update the xml code in the next few days. Until then, you could try to keep the resource stream open, and the images will be saved in their original format along with any transparency.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Saving & Copying images
Reply #4 - Oct 3rd, 2011 at 7:40am
Print Post  
You can find updated version of the control on the PM page. It now encodes images as PNG when the original bytes are not available (after the original image stream is closed) so the transparency should be preserved.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint