Model [.CS] [HttpPost] public int WebUplaodFile() { var upfile = Request.Files["myFile"]; ; if (upfile != null) { new ImgService().ImgMarkImg(Server.MapPath("~/Image"), upfile); } return 1; } Service [.CS] public void ImgMarkImg(string spath, HttpPostedFileBase myfile) { //浮水印檔案路徑 string MarkImgPath = spath + "/imgmark.png"; //暫存檔路徑 string tmpPath = spath + "/Temp/tmp" + DateTime.Now.ToString("yyyyMMddHHmmssff") + ".jpg"; myfile.SaveAs(tmpPath); //作為浮水印的圖檔 System.Drawing.Image watermarkImage = System.Drawing.Image.FromFile(MarkImgPath); //加浮水印 System.Drawing.Image image = System.Drawing.Image.FromFile(tmpPath); ImageFormat thisFormat = image.RawF