Basic watermark parameters
This topic describes the basic parameters for watermarks, such as type, position, transparency, and size, to help you better understand and use the watermark feature.
The following parameters apply to image watermarks, text watermarks, and mixed image-text watermarks.
Name | Description | Parameter type |
t | Transparency. The default value is 100, which means the watermark is opaque. Value range: [0, 100]. | Optional parameters |
p | Position. The default value is 9. Value range: [1, 9]. For the meaning of each value, see the area value mapping table below. | Optional |
x | Horizontal margin. The default value is 10. This parameter applies to specific positions. Value range: [0, 4096]. Unit: pixels (px). | Optional |
y | Vertical margin. This is the vertical distance from the edge of the image. This parameter is valid only when the watermark is positioned at the top-left, top-center, top-right, bottom-left, bottom-center, or bottom-right. Default value: 10. Value range: [0, 4096]. Unit: pixels (px). | Optional |
voffset | Vertical offset from the centerline. When the watermark is positioned at the left-center, center, or right-center, this parameter specifies the upward or downward offset from the centerline. Default value: 0. Value range: [-1000, 1000]. Unit: pixels (px). | Optional parameters |
watermark | The watermark type. Valid values:
| Optional parameters |
The following table maps area values to their corresponding positions.

Notes
The horizontal margin, vertical margin, and vertical offset from the centerline adjust the position of the watermark in the image. If an image has multiple watermarks, these parameters also adjust the layout of the watermarks.
For more information about URL-safe Base64 encoding, see Keywords.
Examples
Add a text watermark to the bottom-right corner of an image.

Add a text watermark to the bottom-right corner of the image. Set the watermark color to white, the horizontal margin to 10 pixels, and the vertical margin to 20 pixels.

Add a text watermark to the bottom-right corner of the image. Set the watermark color to white, the horizontal margin to 10 pixels, the vertical offset from the centerline to 20 pixels, and the transparency to 50.
NoteFor more information about text watermark parameters, see Text watermarks.
