Jump to content
Software FX Community

Increasing the resolution of an exported image


User (Legacy)

Recommended Posts

The following code exports the chart to a bitmap with 300 DPI:

Rectangle r = new Rectangle(0,0,(chart1.Width * 300) / 96,(chart1.Height *

300) / 96);

Bitmap bmp = new Bitmap(r.Width,r.Height);

bmp.SetResolution(300,300);

Graphics g = Graphics.FromImage(bmp);

chart1.Paint(g,r,PaintStyles.Background | PaintStyles.Border |

PaintStyles.Print);

bmp.Save(@"c:\temp\cfxdpi.bmp");

g.Dispose();

bmp.Dispose();

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...