public static Bitmap KiResizeImage(Bitmap bmp, int newW, int newH) { try { Bitmap b = new Bitmap(newW, newH); Graphics g = Graphics.FromImage(b); // 插值算法的质量 g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(bmp, new Rectangle(0, 0, newW, newH), new Rectangle(0, 0, bmp.Width, bmp.Height), GraphicsUnit.Pixel); g.Dispose(); return b; } catch { return null; } }
- 随机文章
- 热门文章
- 热评文章
- 树莓花生壳内网映射官方教程失败解决
- PHP文件操作之,插入某行,删除某行,获取行号
- 用PHP发送POST请求
- 安装包制作工具 SetupFactory使用2 API清单
- Linux下python2.7安装pip
- C#实现邮件发送的功能
- php做下载连接/下载功能
- 锂电池充电的原理