/// <summary>
 /// 上传策略
 /// </summary>
 /// <param name="key">图片相对地址</param>
 /// <param name="width">宽度</param>
 /// <param name="height">高度</param>
 /// <param name="model">缩放信息</param>
 /// <param name="waterMark">水印信息</param>
 public ImgPersistentOps(string key, int width      = 0, int height = 0, int?model = null,
                         StorageWaterMark waterMark = null) : this()
 {
     this.Key       = key;
     this.Width     = width;
     this.Height    = height;
     this.Mode      = model == null ? null : Enumeration.FromValue <ImageModeType>(model.Value);
     this.WaterMark = waterMark;
 }
예제 #2
0
 /// <summary>
 /// 上传策略
 /// </summary>
 /// <param name="key">图片相对地址</param>
 /// <param name="width">宽度</param>
 /// <param name="height">高度</param>
 /// <param name="model">缩放信息</param>
 /// <param name="waterMark">水印信息</param>
 public ImgPersistentOps(string key, int width      = 0, int height = 0, int?model = null,
                         StorageWaterMark waterMark = null)
 {
     Key    = key;
     Width  = width;
     Height = height;
     Mode   = model == null
         ? ImageMode.Nothing
         : Enumeration.FromValue <ImageMode>(model.Value);
     WaterMark = waterMark;
 }