C#修改图片分辨率
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; } }
- 随机文章
- 热门文章
- 热评文章
- html网页 swf播放器使用代码
- kali2.0安装完成后全是乱码解决办法
- 微信公众平台API接口扩展包
- 在树莓派/linux上使用阿里云DNS解析作为DDNS使用
- C# 生成图片缩略图
- 永恒之蓝病毒是什么 怎么防范ONION勒索软件
- Linux下python2.7安装pip
- ESP8266在Eclipse下设置编译模式(有boot和无boot)