c#图片裁剪

c#文件裁剪

Bitmap newbm = new Bitmap(nowWidth, nowHeight);
Graphics g = Graphics.FromImage(newbm);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.SmoothingMode = SmoothingMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
g.DrawImage(bmp, new Rectangle(0, 0, nowWidth, nowHeight), new Rectangle(bmp.Width / 2, 0, bmp.Width / 2, bmp.Height), GraphicsUnit.Pixel);
g.Dispose();
原文地址:https://www.cnblogs.com/lucika/p/10539268.html