image.Save后的图片找不到了
if (postedfile.ContentLength < MaxAllowUploadFileSize && allowext.IsMatch(fileExt)) //检查文件大小及扩展名
{
postedfile.SaveAs(fullpath); //上传到fullpath下面
System.Drawing.Image img = System.Drawing.Image.FromFile(fullpath);
System.Drawing.Image tmp = img.GetThumbnailImage(320, 240, null, IntPtr.Zero);
tmp.Save("test", ImageFormat.Jpeg);
tmp.Dispose();
tmp = null;
}
我首先是将要上传的大图片上传到fullpath下面,然后同时生成缩略图,以便调用,但是tmp.Save("test", ImageFormat.Jpeg)之后,就找不到图片了,但是fullpath下的大图存在,test的目录也没有,想调用小图也调用不到。怎么办呢?