c#生成缩略图代码

c#
2016-03-01 0 803
c#生成缩略图代码
public void SaveThumbnail(string path, string thumbnailPath, int newWidth, int newHeight)
{
    System.Drawing.Image i = System.Drawing.Image.FromFile(path);
    System.Drawing.Image thumbnail = new System.Drawing.Bitmap(newWidth, newHeight);
    System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(thumbnail);
    g.DrawImage(i, 0, 0, newWidth, newHeight);
    thumbnail.Save(thumbnailPath, System.Drawing.Imaging.ImageFormat.Jpeg);
}

遇见资源网 c# c#生成缩略图代码 http://www.ox520.com/13308.html

上一篇: C#读取XML文件
下一篇:

已经没有下一篇了!

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务