public ActionResult Picz(int s, string p, string h = "") { var originalUrl = new Uri(Request.Url, p).AbsoluteUri; var replacement = _imageResizer.GetReplacementImage(s, originalUrl, h); return(File(replacement.Path, replacement.MimeType)); }
public ActionResult Index(int?s, string h = "") { if (!s.HasValue) { s = _defaultSize; } var replacementImage = _imageResizer.GetReplacementImage( size: s.Value, originalUrl: Request.Url.AbsoluteUri.Split('?').FirstOrDefault() + ".jpg", hash: h, getImage: () => System.IO.File.ReadAllBytes(Server.MapPath(Url.Content("~/Content/paris.jpg"))), checkHash: () => "example-1"); return(File(replacementImage.Path, replacementImage.MimeType)); }