日期:2014-05-17  浏览次数:20855 次

Bitmap保存失真,请指教
Bitmap保存时失真,请问如何修改?


C# code

Bitmap bitmap = new Bitmap(200, 200, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bitmap);
g.DrawString("Bitmap方法外部测试", new Font("宋体", 6), new SolidBrush(Color.Black), 2, 2);
g.Dispose();bitmap.Save("D://bmp.bmp");
bitmap.Dispose();



------解决方案--------------------
参考下面:
http://tech.ddvip.com/2009-05/1243237863120924.html
------解决方案--------------------
加这3句看看:
g.SmoothingMode = SmoothingMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;