예제 #1
0
 public static Image Thumbnail(string sourcePath, string thumbnailPath, int width, int height)
 {
     if (string.IsNullOrEmpty(sourcePath) || !File.Exists(sourcePath))
     {
         throw new ArgumentException("原图片的地址不能为空或文件不存在");
     }
     return(ImageUtil.Thumbnail(Image.FromFile(sourcePath), thumbnailPath, width, height));
 }
예제 #2
0
 public static Image Thumbnail(Image image, int width, int height)
 {
     return(ImageUtil.Thumbnail(image, string.Empty, width, height));
 }