Previewing an Embedded Image Watermark by Address
Function
This API is used to embed a watermark based on the provided image address and generate a preview.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/watermark/embed/image-address/preview
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
blind_watermark |
No |
String |
Invisible watermark content. |
|
dst_file |
No |
String |
Target file path. |
|
image_watermark |
No |
String |
Image watermark content. |
|
is_blind_mark |
No |
Boolean |
Whether to embed the invisible watermark. |
|
is_visible_mark |
No |
Boolean |
Whether to embed the visible watermark. |
|
offset_x |
No |
Integer |
Watermark horizontal offset. |
|
offset_y |
No |
Integer |
Watermark vertical offset. |
|
opacity |
No |
Integer |
Watermark transparency. |
|
region_id |
No |
String |
Region ID. |
|
src_file |
No |
String |
Source file path. |
|
text_color |
No |
Integer |
Text color. |
|
text_rotation |
No |
Integer |
Text rotation angle. |
|
visible_image_watermark |
No |
String |
Visible image watermark. |
|
visible_text_watermark |
No |
String |
Visible text watermark. |
|
visible_watermark_position |
No |
String |
Visible watermark position. |
|
visible_watermark_type |
No |
String |
Visible watermark type. |
|
watermark_size |
No |
Integer |
Watermark size. |
Response Parameters
Status code: 200
Preview generated.
Status code: 201
Preview generated.
None
Example Requests
POST /v1/{project_id}/watermark/embed/image-address/preview
{
"dst_file" : "obs://autotest-add/dsc_test.png",
"is_blind_mark" : false,
"is_visible_mark" : true,
"offset_x" : 0,
"offset_y" : 0,
"opacity" : 50,
"region_id" : "string",
"src_file" : "obs://a-real-obs/dsc.png",
"text_color" : 15688290,
"visible_text_watermark" : "test",
"visible_watermark_position" : "CENTER",
"visible_watermark_type" : "TEXT",
"watermark_size" : 50
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Preview generated. |
|
201 |
Preview generated. |
|
401 |
Unauthorized. |
|
403 |
Access denied. |
|
404 |
Resource not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot