//有的时候剪切图片时,出现图片失真的问题,是因为图片质量下降造成的 //按照指定的数据画出画板(位图) System.Drawing.Image imgPhoto = System.Drawing.Image.FromFile(imgPath); Bitmap bmPhoto=new Bitmap(CutWidth/2, CutHeight/2,System.Drawing.Imaging.PixelFormat.Format24bppRgb); //创建画笔并按照数据把指定的部分画到画板上 Graphics G80 = Graphics.FromImage(bmPhoto80); G80.Clear(Color.White); // 指定高质量的双三次插值法。执行预筛选以确保高质量的收缩。此模式可产生质量最高的转换图像。 G80.InterpolationMode = InterpolationMode.HighQualityBicubic; // 指定高质量、低速度呈现。 G80.SmoothingMode = SmoothingMode.HighQuality; G80.DrawImage(参数); //把画好的画板保存到http数据流中 bmPhoto80.Save(路径)