/// <summary> /// Creates a new watermark from a specified image /// </summary> /// <param name="Name">The name for the watermark</param> /// <param name="Dissolve">The opacity of the watermark on the target image. Default: 0 Min: 0 Max: 100 </param> /// <param name="Pinned">The location of the watermark on the target image. Values: Bottom, BottomLeft, BottomRight, Center (default), Left, Right, Tile, Top, TopLeft, TopRight</param> /// <param name="Thumbs">This watermark is applied to thumbnail image sizes. Default: false </param> /// <param name="Extras">A comma seperated string of additional attributes to return in the response.</param> /// <returns>Watermark</returns> public Watermark CreateWatermark(string Name, int Dissolve, PinnedEnum Pinned, bool Thumbs, string Extras) { CommunicationHelper ch = new CommunicationHelper(); // SessionID [required], ImageID [required], Name [required], Callback, Dissolve, Pinned, Pretty, Strict, Thumbs var resp = ch.ExecuteMethod<WatermarkResponse>("smugmug.watermarks.create", basic, "ImageID", id, "Name", Name, "Dissolve", Dissolve, "Pinned", Pinned, "Thumbs", Thumbs, "Extras", Extras); if (resp.stat == "ok") { var myWatermark = resp.Watermark; if (myWatermark != null) { myWatermark.basic = basic; myWatermark.Name = Name; } return myWatermark; } else { Console.WriteLine(resp.message); throw new SmugMugException(resp.code, resp.message, resp.method); } }
/// <summary> /// Creates a new watermark from a specified image /// </summary> /// <param name="Name">The name for the watermark</param> /// <param name="Dissolve">The opacity of the watermark on the target image. Default: 0 Min: 0 Max: 100 </param> /// <param name="Pinned">The location of the watermark on the target image. Values: Bottom, BottomLeft, BottomRight, Center (default), Left, Right, Tile, Top, TopLeft, TopRight</param> /// <param name="Thumbs">This watermark is applied to thumbnail image sizes. Default: false </param> /// <param name="Extras">A comma seperated string of additional attributes to return in the response.</param> /// <returns>Watermark</returns> public Watermark CreateWatermark(string Name, int Dissolve, PinnedEnum Pinned, bool Thumbs, string Extras) { return CreateWatermarkAsync(Name, Dissolve, Pinned, Thumbs, Extras).Result; }
/// <summary> /// Creates a new watermark from a specified image /// </summary> /// <param name="Name">The name for the watermark</param> /// <param name="Dissolve">The opacity of the watermark on the target image. Default: 0 Min: 0 Max: 100 </param> /// <param name="Pinned">The location of the watermark on the target image. Values: Bottom, BottomLeft, BottomRight, Center (default), Left, Right, Tile, Top, TopLeft, TopRight</param> /// <param name="Thumbs">This watermark is applied to thumbnail image sizes. Default: false </param> /// <returns>Watermark</returns> public Watermark CreateWatermark(string Name, int Dissolve, PinnedEnum Pinned, bool Thumbs) { return CreateWatermark(Name, Dissolve, Pinned, Thumbs, ""); }
/// <summary> /// Creates a new watermark from a specified image /// </summary> /// <param name="Name">The name for the watermark</param> /// <param name="Dissolve">The opacity of the watermark on the target image. Default: 0 Min: 0 Max: 100 </param> /// <param name="Pinned">The location of the watermark on the target image. Values: Bottom, BottomLeft, BottomRight, Center (default), Left, Right, Tile, Top, TopLeft, TopRight</param> /// <param name="Thumbs">This watermark is applied to thumbnail image sizes. Default: false </param> /// <returns>Watermark</returns> public async Task<Watermark> CreateWatermarkAsync(string Name, int Dissolve, PinnedEnum Pinned, bool Thumbs) { return await CreateWatermarkAsync(Name, Dissolve, Pinned, Thumbs, ""); }