예제 #1
0
파일: AController.cs 프로젝트: JFFby/MRO
 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);
        }
예제 #4
0
파일: AController.cs 프로젝트: JFFby/MRO
 public ActionResult Resize()
 {
     var service = new ImageService();
     service.AdjustImages(HttpContext.Server.MapPath);
     return Json(new { success = true }, JsonRequestBehavior.AllowGet);
 }