WebImage.AddImageWatermark 方法

定义

重载

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

使用水印图像的路径添加水印图像。

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

使用指定图像对象添加水印图像。

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

使用水印图像的路径添加水印图像。

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

参数

watermarkImageFilePath
String

包含水印图像的文件的路径。

width
Int32

水印图像的宽度(以像素为单位)。

height
Int32

水印图像的高度(以像素为单位)。

horizontalAlign
String

水印图像的水平对齐。 值可以为“靠左”、“靠右”或“居中”。

verticalAlign
String

水印图像的垂直对齐。 值可以为“靠上”、“居中”或“靠下”。

opacity
Int32

水印图像的不透明度,已指定为 0 和 100 之间的某个值。

padding
Int32

水印图像周围的边距的大小(以像素为单位)。

返回

打了水印的图像。

适用于

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

使用指定图像对象添加水印图像。

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

参数

watermarkImage
WebImage

WebImage 对象。

width
Int32

水印图像的宽度(以像素为单位)。

height
Int32

水印图像的高度(以像素为单位)。

horizontalAlign
String

水印图像的水平对齐。 值可以为“靠左”、“靠右”或“居中”。

verticalAlign
String

水印图像的垂直对齐。 值可以为“靠上”、“居中”或“靠下”。

opacity
Int32

水印图像的不透明度,已指定为 0 和 100 之间的某个值。

padding
Int32

水印图像周围的边距的大小(以像素为单位)。

返回

打了水印的图像。

适用于