以下代码是 我从网络上整理的 上传图片并 按高 自动缩放代码,有错误提示:使用无用参数public void SmallPicWidth(string strOldPic, string strNewPic, int intHeight)
{
System.Drawing.Bitmap objPic,objNewPic;
try
{
objPic =new System.Drawing.Bitmap(strOldPic);
int intWidth =(intHeight/objPic.Height)*objPic.Width;//这个不应该为0的,在调试时候他为0,估计是这的问题 objNewPic = new System.Drawing.Bitmap(objPic,intWidth,intHeight);
objNewPic.Save(strNewPic);
}
catch(Exception exp) 

throw exp;
}
finally
{
objPic = null;
objNewPic = null;
}
}