Share via


WebImage.AddImageWatermark Method (WebImage, Int32, Int32, String, String, Int32, Int32)

Adds a watermark image using the specified image object.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Function AddImageWatermark ( _
    watermarkImage As WebImage, _
    width As Integer, _
    height As Integer, _
    horizontalAlign As String, _
    verticalAlign As String, _
    opacity As Integer, _
    padding As Integer _
) As WebImage
'Usage
Dim instance As WebImage 
Dim watermarkImage As WebImage 
Dim width As Integer 
Dim height As Integer 
Dim horizontalAlign As String 
Dim verticalAlign As String 
Dim opacity As Integer 
Dim padding As Integer 
Dim returnValue As WebImage 

returnValue = instance.AddImageWatermark(watermarkImage, _
    width, height, horizontalAlign, verticalAlign, _
    opacity, padding)
public WebImage AddImageWatermark(
    WebImage watermarkImage,
    int width,
    int height,
    string horizontalAlign,
    string verticalAlign,
    int opacity,
    int padding
)
public:
WebImage^ AddImageWatermark(
    WebImage^ watermarkImage, 
    int width, 
    int height, 
    String^ horizontalAlign, 
    String^ verticalAlign, 
    int opacity, 
    int padding
)
member AddImageWatermark : 
        watermarkImage:WebImage * 
        width:int * 
        height:int * 
        horizontalAlign:string * 
        verticalAlign:string * 
        opacity:int * 
        padding:int -> WebImage
public function AddImageWatermark(
    watermarkImage : WebImage, 
    width : int, 
    height : int, 
    horizontalAlign : String, 
    verticalAlign : String, 
    opacity : int, 
    padding : int
) : WebImage

Parameters

  • width
    Type: System.Int32
    The width, in pixels, of the watermark image.
  • height
    Type: System.Int32
    The height, in pixels, of the watermark image.
  • horizontalAlign
    Type: System.String
    The horizontal alignment for watermark image. Values can be "Left", "Right", or "Center".
  • verticalAlign
    Type: System.String
    The vertical alignment for the watermark image. Values can be "Top", "Middle", or "Bottom".
  • opacity
    Type: System.Int32
    The opacity for the watermark image, specified as a value between 0 and 100.
  • padding
    Type: System.Int32
    The size, in pixels, of the padding around the watermark image.

Return Value

Type: System.Web.Helpers.WebImage
The watermarked image.

See Also

Reference

WebImage Class

AddImageWatermark Overload

System.Web.Helpers Namespace