Example #1
0
 public ActionResult Index()
 {
     string identificateur = User.Identity.GetUserId();
     photo = new Photo();
     Session["image"] = photo.GetCurrentPhoto(identificateur);
     return View();
 }
Example #2
0
 public FileContentResult getImg(int newWidth, int newHeight)
 {
     string identificateur = User.Identity.GetUserId();
     photo = new Photo();
     byte[] byteArray = photo.GetCurrentPhoto(identificateur);
     return byteArray != null
         ? new FileContentResult(ResizeImage(byteArray, newWidth, newHeight), "image/jpeg")
         : null;
 }