日期:2014-05-17 浏览次数:20478 次
System.Drawing.Image image = System.Drawing.Image.FromStream(fu.PostedFile.InputStream);
int width = image.Width;
int heigh = image.Height;
int max = heigh;
if (width != 358 || heigh != 358)
{
try
{
System.Drawing.Image newImg;
string n = DateTime.Now.Ticks.ToString();
fileName = "MuProductImages/" + n + geshi;
serverpath1 = serverpath1 + n + geshi; ;
//如果存在这个图片就删除
if (File.Exists(serverpath1))
{
File.Delete(serverpath1);
}
if (width != heigh)
{
//保存为宽,高为358 的新图片
&nb