Hi, I have a problem when I export a diagram to JPG, when the diagram is very large, the image looks bad, and looks very pixilated.
This is my code:
Rect bounds = myDiagram.Panel.DiagramBounds;
Double w = bounds.Width;
Double h = bounds.Height;
Double scale = 2.0;
If (w> 2000) scale = 5000 / w;
If (h> 2000) scale = Math.Min (scale, 5000 / h);
W * = scale;
H * = scale;
This.myDiagram.Panel.MakeBitmap (new Size (w, h), 96, new Point (bounds.X, bounds.Y), scale, bmp =>
{
WriteableBitmap bitmap = new WriteableBitmap (bmp);
Var img = bitmap.ToImage ();
Using (Stream stream = sd.OpenFile ())
{
Img.WriteToStream (stream);
}
MessageWindow Message = new MessageWindow ();
Message.TextError.Text = "Finished export";
Show.
});
If I change “w” or “h” I have a error out of memory… I need the image to look better. Can you export to a vector graphic?