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();

 

posted on 2019-03-15 20:16  lucika.zh  阅读(1489)  评论(0编辑  收藏  举报

导航