public JsonResult Determine(string path, bool resize = false) { var service = new ImageService(); return path == null ? Json("fail", JsonRequestBehavior.AllowGet) : Json(service.Define(path, resize), JsonRequestBehavior.AllowGet); }
public void ImageOfPerspmDoesContainPerson() { IImageService imageService = new ImageService(_eventAggregator); bool result = imageService.ContainsPerson(_faceImage); Assert.IsTrue(result); }
public void EmptyImageDoesNotContainPerson() { IImageService imageService = new ImageService(_eventAggregator); bool result = imageService.ContainsPerson(_emptyImage); Assert.IsFalse(result); }
public ActionResult Resize() { var service = new ImageService(); service.AdjustImages(HttpContext.Server.MapPath); return Json(new { success = true }, JsonRequestBehavior.AllowGet); }