|
Group: Forum Members
Posts: 61,
Visits: 35
|
sorry I got the answer: source: http://stackoverflow.com/questions/87753/resizing-an-image-without-losing-any-quality
//resize picture //keeping quality Bitmap bm = new Bitmap("something.png"); Bitmap newImage = new Bitmap(100, 100); using (Graphics gr = Graphics.FromImage(newImage)) { gr.SmoothingMode = SmoothingMode.HighQuality; gr.InterpolationMode = InterpolationMode.HighQualityBicubic; gr.PixelOffsetMode = PixelOffsetMode.HighQuality; gr.DrawImage(bm, new Rectangle(0, 0, 100, 100)); }
//set picture for backgournd NImageFillStyle imageFill = new NImageFillStyle(newImage);
imageFill.TextureMappingStyle.MapLayout = MapLayout.Centered; m_Chart.Wall(ChartWallType.Back).FillStyle = imageFill;
nChartControl1.Refresh();
|