Ejemplo n.º 1
0
 /// <summary>添加图像水印</summary>
 /// <param name="signImagePath">图像文件路径</param>
 /// <param name="posType">要添加的地位</param>
 /// <param name="signTransparency">水印不透明度(0-100,0 为完全透明,100 为完全不透明)</param>
 /// <param name="size">水印占原图像的百分比,只有在水印缩放后不大于源图像时才启作用</param>
 public void AddSignImage(string signImagePath, PositionType posType, int signTransparency, int size)
 {
     if (!Utils.FileExists(signImagePath))
     {
         return;
     }
     using (Image image = ImageParse.GetImageFromFile(signImagePath))
         this.AddSignImage(image, posType, signTransparency, size);
 }
Ejemplo n.º 2
0
 /// <summary>初始化一个新 <see cref="ImageParse" /> 实例。</summary>
 /// <param name="imgFile">图像文件路径</param>
 public ImageParse(string imgFile) : this(ImageParse.GetImageFromFile(imgFile))
 {
 }