convert bitmap to image for ASP.NET

前端 未结 6 1556
无人及你
无人及你 2021-01-24 23:16

this is how my code look now:

System.Drawing.Image objImage = System.Drawing.Image.FromFile(Server.MapPath(\"aaa.jpg\"));

int height = objImage.Height;
int widt         


        
6条回答
  •  爱一瞬间的悲伤
    2021-01-25 00:20

    MapPath will give you a physycal address, not a virtual address which is what the browser needs to get to the image.

提交回复
热议问题