Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Save Workflow to image (Read 10436 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save Workflow to image
Reply #15 - Jun 25th, 2009 at 1:35pm
Print Post  
Hi,

Try calling Bitmap.SetResolution(96, 96) or Bitmap.SetResolution(128, 128) for each image you load on the server before exporting. If it's still the same, please email us the diagram XML and the image files.

Stoyan
  
Back to top
 
IP Logged
 
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Re: Save Workflow to image
Reply #16 - Jun 25th, 2009 at 2:15pm
Print Post  
Hi Stoyan,

I have sent the email with the icons and graphXML. Please have a look and provide the remedy.

Thanks in advance,
Amit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save Workflow to image
Reply #17 - Jun 26th, 2009 at 2:15pm
Print Post  
It seems to work fine if you do this after loading the diagram:

foreach (DiagramNode node in _diagram.Nodes)
{
     string imageFileName = node.Tag.ToString();
     imageFileName = System.IO.Path.Combine(imageRootPath, imageFileName);
     Image image = Image.FromFile(imageFileName);
     (image as Bitmap).SetResolution(96, 96);

     ShapeNode shapeNode = node as ShapeNode;
     shapeNode.Image = image;

     Font font = shapeNode.Font;
     shapeNode.Font = new Font(font.FontFamily, font.Size * 72 / 96, font.Style);
}

Instead of managing the image resolution, you might also try to set ImageAlign to Fit so that the image always fits your shape's ImageRectangle.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jaiswalamit
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Feb 17th, 2009
Re: Save Workflow to image
Reply #18 - Jul 1st, 2009 at 9:12am
Print Post  
Hi Stoyan,

I am more or less done with the export functionality to image format (PNG). So as per your previous messages, when can I get the copy of free netdiagramming component which I can use only for this purpose.

Thanks & Regards,
Amit
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Save Workflow to image
Reply #19 - Jul 1st, 2009 at 2:54pm
Print Post  
Hi Amit,

Check the PM page.

Regards,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint