第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

保存圖片提示System.Drawing.Image.Save 方法而導(dǎo)致 GDI+ 中發(fā)生一般性錯(cuò)誤 的發(fā)生

保存圖片提示System.Drawing.Image.Save 方法而導(dǎo)致 GDI+ 中發(fā)生一般性錯(cuò)誤 的發(fā)生

慕絲7291255 2018-12-06 13:33:41
?Image imgPhoto = Image.FromFile(ImgFile);??????????? Bitmap bmPhoto = new Bitmap(CutWidth, CutHeight, System.Drawing.Imaging.PixelFormat.Format24bppRgb); ??????????? Graphics gbmPhoto = Graphics.FromImage(bmPhoto);??????????? gbmPhoto.DrawImage(imgPhoto, new Rectangle(0, 0, CutWidth, CutHeight), PointX * imgPhoto.Width / PicWidth, PointY * imgPhoto.Height / PicHeight, CutWidth * imgPhoto.Width / PicWidth, CutHeight * imgPhoto.Height / PicHeight, GraphicsUnit.Pixel);??????????? gbmPhoto.Dispose(); ???????????? if (!Directory.Exists(HttpContext.Current.Server.MapPath("/DZ/User/UserImages")))??????????? {??????????????? Directory.CreateDirectory(HttpContext.Current.Server.MapPath("/DZ/User/UserImages"));??????????? }??????????????? bmPhoto.Save(HttpContext.Current.Server.MapPath("/DZ/User/UserImages/"), System.Drawing.Imaging.ImageFormat.Jpeg);??????????????? imgPhoto.Dispose();??????????????? gbmPhoto.Dispose();??????????????? bmPhoto.Dispose();???????????System.Drawing.Image.Save 方法而導(dǎo)致 GDI+ 中發(fā)生一般性錯(cuò)誤 的發(fā)生,請(qǐng)各位打俠幫我看下,那代碼出問題了
查看完整描述

2 回答

?
HUX布斯

TA貢獻(xiàn)1876條經(jīng)驗(yàn) 獲得超6個(gè)贊

HttpContext.Current.Server.MapPath("/DZ/User/UserImages/imgname.jpg")

查看完整回答
反對(duì) 回復(fù) 2019-01-21
?
侃侃無極

TA貢獻(xiàn)2051條經(jīng)驗(yàn) 獲得超10個(gè)贊

這是一個(gè)目錄,你需要提供一個(gè)文件名來保存。

bmPhoto.Save(HttpContext.Current.Server.MapPath("/DZ/User/UserImages/"), System.Drawing.Imaging.ImageFormat.Jpeg);

查看完整回答
反對(duì) 回復(fù) 2019-01-21
  • 2 回答
  • 0 關(guān)注
  • 814 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)