/// <summary> /// Action:获取图片文件 /// </summary> public FileContentResult GetImg(string url, int width = 100, int height = 100, string mode = "Cut") { string path = Server.MapPath(url); if (System.IO.File.Exists(path)) { byte[] bb = CommonInfo.MakeThumbnail(path, width, height, mode, true); FileContentResult r = File(bb, "image/jpg"); return(r); } else { return(null); } }