您的位置:首页 > 编程语言 > C#

c# 改变图片大小

2010-11-09 15:52 155 查看
System.Drawing.Bitmap objPic,objNewPic;
try
{
  objPic = new System.Drawing.Bitmap(strOldPic);
  int intHeight=(intWidth / objPic.Width) * objPic.Height;
  objNewPic=new System.Drawing.Bitmap(objPic,intWidth,intHeight);
  objNewPic.Save(strNewPic);

}
catch(Exception exp){throw exp;}
finally
{
  objPic=null;
  objNewPic=null;
}
}


资料来源:学网(www.xue5.com),原文地址:http://www.xue5.com/itedu/200802/109565.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: