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

 

相关文章:

  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-06-30
  • 2021-05-31
  • 2021-12-17
  • 2021-04-16
  • 2022-02-07
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2021-12-18
  • 2022-01-15
相关资源
相似解决方案