Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1.  private void ProcessImage(
  2.             HttpPostedFileBase postedFile,
  3.             string imageLocation,
  4.             string thumbLocation)
  5.         {
  6.             var webImage = new WebImage(postedFile.InputStream);
  7.  
  8.             // temporarily save the original image
  9.             webImage.Save(imageLocation + "_original");
  10.  
  11.             webImage.Resize(317, 342);
  12.             webImage.Crop(1, 1, 1, 1);
  13.             webImage.Save(imageLocation);
  14.  
  15.             webImage.Resize(172, 172);
  16.             webImage.Crop(1, 1, 1, 1);
  17.             webImage.Save(thumbLocation);
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement