Ejemplo n.º 1
0
 /// <summary>
 /// Returns the Contrast image.
 /// </summary>
 /// <returns>The Contrast image as a FileResult to be downloaded.</returns>
 public FileResult Contrast()
 {
     var ImageProcessor = new ImageProcessor();
     ImageProcessor.SetImage(DroppedImage);
     var resultImg = ImageProcessor.Contrast(50, false);
     ImageProcessor.UnlockImage();
     MemoryStream str = new MemoryStream();
     resultImg.Save(str, ImageFormat.Png);
     str.Close();
     return File(str.GetBuffer(), "application/octet-stream",
         string.Format("{0}_Contrast.png",
         Path.GetFileNameWithoutExtension(FileName)));
 }