Torch Object Storage
Parameter | Description | Value | Required |
Parameter | Description | Value | Required |
t | Opacity of the text or image watermark. |
| No |
g | Location of the watermark in an image. |
| No |
x | The horizontal margin, or the horizontal distance between the watermark and the edge of the image. This parameter only applies when the watermark is set to top left, center left, bottom left, top right, center right, or bottom right. |
| No |
y | The vertical margin, or the vertical distance between the watermark and the edge of the image. This parameter only applies when the watermark position is set to top left, top center, top right, bottom left, bottom center or bottom right. |
| No |
voffset | Vertical offset from the middle line. This parameter can be used to move the watermark up or down from the center line when the watermark is in the center, center left, or center right. |
| No |
Parameter | Description | Value | Required |
Parameter | Description | Value | Required |
image | Filename of the watermark image, which must be encoded in URL-safe Base64. The watermark image must be in the same bucket as the original image. | A Base64-encoded string. | Required for adding an image watermark |
P | The ratio of the watermark size to the size of the original image. This parameter is a special resize parameter that can only be used to preprocess watermark images. | A percentage. Example: When p = 10 and the original image size is 100x100, the watermark size is 10x10. If the original image size is 200x200, then the watermark size is 20x20. | No |
Others | Other parameters used to preprocess the watermark image. | Resizing, cropping, indexed cropping, or rotation can be performed on the image. | No |
Parameter | Description | Value | Required |
Parameter | Description | Value | Required |
text | Content of the text watermark, which must be encoded in URL-safe Base64. | The string to encode can contain up to 64 characters. | Required for adding a text watermark |
type | Font of the text watermark, which must be encoded in URL-safe Base64. | The available options are WenQuanYi Zen Hei (the default option), WenQuanYi Micro Hei, Fāng Zhèng Shū Sòng, Fāng Zhèng Kǎi Tǐ, Fāng Zhèng Hēi Tǐ, Fāng Zhèng Fǎng Sòng, and DroidSansFallback. See the table below for more information on font encoding. | No |
color | Color of the text watermark. | A hexadecimal color code ranging from 000000 to FFFFFF. The default is 000000 (black). | No |
size | Size of the text watermark. |
| No |
shadow | Shadow opacity of the text watermark. |
| No |
rotate | Degree of the clockwise rotation of the text watermark. |
| No |
fill | Specifies whether to fill the original image with the text watermark. |
| No |
Original value | URL-safe Base64 encoding | Font | Remarks |
Original value | URL-safe Base64 encoding | Font | Remarks |
wqy-zenhei | d3F5LXplbmhlaQ | WenQuanYi Zen Hei | The padding character (=) is omitted. |
wqy-microhei | d3F5LW1pY3JvaGVp | WenQuanYi Micro Hei | None. |
fangzhengshusong | ZmFuZ3poZW5nc2h1c29uZw | Fāng Zhèng Shū Sòng | The padding character (=) can be omitted. |
fangzhengkaiti | ZmFuZ3poZW5na2FpdGk | Fāng Zhèng Kǎi Tǐ | The padding character (=) can be omitted. |
fangzhengheiti | ZmFuZ3poZW5naGVpdGk | Fāng Zhèng Hēi Tǐ | The padding character (=) can be omitted. |
fangzhengfangsong | ZmFuZ3poZW5nZmFuZ3Nvbmc | Fāng Zhèng Fǎng Sòng | The padding character (=) can be omitted. |
droidsansfallback | ZHJvaWRzYW5zZmFsbGJhY2s | DroidSansFallback | The padding character (=) can be omitted. |
Parameter | Description | Value | Required |
Parameter | Description | Value | Required |
order | Order of the watermark text and image. |
| No |
align | Alignment mode of text and image watermarks. |
| No |
interval | Margin between the text and image watermarks. |
| No |