Share via


WebImage.AddTextWatermark Method

Definition

Adds watermark text to the image.

public System.Web.Helpers.WebImage AddTextWatermark (string text, string fontColor = "Black", int fontSize = 12, string fontStyle = "Regular", string fontFamily = "Microsoft Sans Serif", string horizontalAlign = "Right", string verticalAlign = "Bottom", int opacity = 100, int padding = 5);
member this.AddTextWatermark : string * string * int * string * string * string * string * int * int -> System.Web.Helpers.WebImage
Public Function AddTextWatermark (text As String, Optional fontColor As String = "Black", Optional fontSize As Integer = 12, Optional fontStyle As String = "Regular", Optional fontFamily As String = "Microsoft Sans Serif", Optional horizontalAlign As String = "Right", Optional verticalAlign As String = "Bottom", Optional opacity As Integer = 100, Optional padding As Integer = 5) As WebImage

Parameters

text
String

The text to use as a watermark.

fontColor
String

The color of the watermark text.

fontSize
Int32

The font size of the watermark text.

fontStyle
String

The font style of the watermark text.

fontFamily
String

The font type of the watermark text.

horizontalAlign
String

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

verticalAlign
String

The vertical alignment for the watermark text. 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 text.

Returns

The watermarked image.

Applies to