Public Parameters

Public parameters are applicable to setting image watermarks and text watermarks. You can add text watermarks and image watermarks to the same image. Table 1 lists the basic parameters in details.

Table 1 Public Parameters

Parameter

Value Description

Code Example

g

Optional, represents the location of the watermark: tltoptrleftcenterrightblbottom, and br. The default value is tl.

Figure 1 is the 3 x 3 grid illustrating these values. Each value locates at the top left corner of a grid.

image/watermark,image_aW1hZ2UtZGVtby9sb2dvLnBuZw==,g_br,t_90,x_10,y_10

x

Optional parameter, representing the horizontal distance from the image edge. By default, the origin is at the top left corner. x ranges [0, 4096]. It is set to 10 by default, with the unit pixel (px).

x is meaningful only when g is set to tlleftbltrright, and br. That is to say, the watermark locates in the top left, left, bottom left, top right, right, or bottom right grid.

y

Optional parameter, representing the vertical distance from the image edge. By default, the origin is at the top left corner. x ranges [0, 4096]. It is set to 10 by default, with the unit pixel (px).

y is meaningful only when g is set to tltoptrblbottom, and br. That is to say, the watermark locates in the top left, top, top right, bottom left, bottom, or bottom right grid.

voffset

Optional parameter, representing the vertical offset from the horizontal centerline of the image. This parameter offsets the watermark up or down from the horizontal centerline of the image. voffset ranges [-1000, 1000]. It is set to 0 by default, with the unit pixel (px).

voffset is meaningful only when g is set to leftcenter, or right. That is to say, the watermark locates in the left, center, or right grid.

align

Optional parameter, representing the align mode of the text watermark and the image watermark. The value can be 01, or 2. It is set to 0 by default.

  • 0: The top edges of the text watermark and the image watermark are aligned.
  • 1: The centerlines of the text watermark and the image watermark are aligned.
  • 2: The bottom edges of the text watermark and the image watermark are aligned.

order

Optional parameter, representing the sequence of the text watermark and the image watermark. The order can be set to 0 or 1. It is set to 0 by default.

  • 0: Image in front, text behind.
  • 1: Text in front, image behind.

t

Optional parameter, representing the extent of transparency of the text or image watermark. t ranges [0, 100]. The default value is 100, indicating the watermark is not transparent at all.

interval

Optional parameter, representing the distance between the text watermark and image watermark. The interval ranges [0, 1000].

Figure 1 is the 3 x 3 grid illustrating the location of the watermark.

Figure 1 3 x 3 grid of watermark location
NOTE:

If both a text watermark and an image watermark are added to the original image, the location of the watermark can be adjusted by the horizontal distance x, vertical distance y, and the vertical offset from the horizontal centerline voffset. You can adjust the layout of the two watermarks as well.

Registration