Share via


WebImage.AddImageWatermark Method

Definition

Overloads

AddImageWatermark(String, Int32, Int32, String, String, Int32, Int32)

Adds a watermark image using a path to the watermark image.

AddImageWatermark(WebImage, Int32, Int32, String, String, Int32, Int32)

Adds a watermark image using the specified image object.

AddImageWatermark(String, Int32, Int32, String, String, Int32, Int32)

Adds a watermark image using a path to the watermark image.

public System.Web.Helpers.WebImage AddImageWatermark (string watermarkImageFilePath, int width = 0, int height = 0, string horizontalAlign = "Right", string verticalAlign = "Bottom", int opacity = 100, int padding = 5);
member this.AddImageWatermark : string * int * int * string * string * int * int -> System.Web.Helpers.WebImage
Public Function AddImageWatermark (watermarkImageFilePath As String, Optional width As Integer = 0, Optional height As Integer = 0, Optional horizontalAlign As String = "Right", Optional verticalAlign As String = "Bottom", Optional opacity As Integer = 100, Optional padding As Integer = 5) As WebImage

Parameters

watermarkImageFilePath
String

The path of a file that contains the watermark image.

width
Int32

The width, in pixels, of the watermark image.

height
Int32

The height, in pixels, of the watermark image.

horizontalAlign
String

The horizontal alignment for watermark image. Values can be "Left", "Right", or "Center".

verticalAlign
String

The vertical alignment for the watermark image. Values can be "Top", "Middle", or "Bottom".

opacity
Int32

The opacity for the watermark image, specified as a value between 0 and 100.

padding
Int32

The size, in pixels, of the padding around the watermark image.

Returns

The watermarked image.

Applies to

AddImageWatermark(WebImage, Int32, Int32, String, String, Int32, Int32)

Adds a watermark image using the specified image object.

public System.Web.Helpers.WebImage AddImageWatermark (System.Web.Helpers.WebImage watermarkImage, int width = 0, int height = 0, string horizontalAlign = "Right", string verticalAlign = "Bottom", int opacity = 100, int padding = 5);
member this.AddImageWatermark : System.Web.Helpers.WebImage * int * int * string * string * int * int -> System.Web.Helpers.WebImage
Public Function AddImageWatermark (watermarkImage As WebImage, Optional width As Integer = 0, Optional height As Integer = 0, Optional horizontalAlign As String = "Right", Optional verticalAlign As String = "Bottom", Optional opacity As Integer = 100, Optional padding As Integer = 5) As WebImage

Parameters

watermarkImage
WebImage

A WebImage object.

width
Int32

The width, in pixels, of the watermark image.

height
Int32

The height, in pixels, of the watermark image.

horizontalAlign
String

The horizontal alignment for watermark image. Values can be "Left", "Right", or "Center".

verticalAlign
String

The vertical alignment for the watermark image. Values can be "Top", "Middle", or "Bottom".

opacity
Int32

The opacity for the watermark image, specified as a value between 0 and 100.

padding
Int32

The size, in pixels, of the padding around the watermark image.

Returns

The watermarked image.

Applies to