Example #1
0
 public static Image Watermark(string sourcePath, string watermarkPath, string mark, WatermarkPosition position)
 {
     if (string.IsNullOrEmpty(sourcePath) || !File.Exists(sourcePath))
     {
         throw new ArgumentException("原图片的地址不能为空或文件不存在");
     }
     return(ImageUtil.Watermark(Image.FromFile(sourcePath), watermarkPath, mark, position));
 }
Example #2
0
 public static Image Watermark(Image image, string mark, WatermarkPosition position)
 {
     return(ImageUtil.Watermark(image, string.Empty, mark, position));
 }