Decodes the blind watermark in an image.
Operation description
- Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).
- Make sure that an IMM project is created. For information about how to create a project, see CreateProject .
- A blind watermark can still be extracted even if attacks, such as compression, scaling, cropping, rotation, and color transformation, are performed on the image.
- This operation is an asynchronous operation. After a task is executed, the task information is saved only for seven days. When the retention period ends, the task information can no longer be retrieved. You can call the GetTask or ListTasks operation to query information about the task. If you specify Notification , you can obtain information about the task based on notifications.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
imm:CreateDecodeBlindWatermarkTask | create | *Project acs:imm:{#regionId}:{#accountId}:project/{#ProjectName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | immtest | |
SourceURI | string | Yes | The OSS URI of the image. Specify the OSS URI in the | oss://target/sampleobject.jpg |
StrengthLevel | string | No | The watermark strength level. The higher the strength level, the more resistant the watermarked image is to attacks, but the more the image is distorted. Valid values: low, medium, and high. Default value: low. | low |
WatermarkType | string | No | The type of the watermark. Valid value: text. No image watermarks are supported. | text |
TargetURI | string | No | The OSS URI of the output image.
Specify the OSS URI in the | oss://target/targetobject.jpg |
ImageQuality | integer | No | The quality of the output image. The higher the quality, the larger the image size and the higher the watermark resolution quality. | 90 |
Model | string | No | The watermark algorithm model.Valid values: FFT, FFT_FULL, DWT, and DWT_IBG. Default value: FFT. If this parameter is left empty, the DecodeBlindWatermark operation is called. Otherwise, the CreateDecodeBlindWatermarkTask operation is called. | FFT |
OriginalImageURI | string | No | The OSS URI of the image before the blind watermark is added. Do not specify this parameter when you set the Model parameter to DWT or DWT_IBG. Specify the OSS URI in the | oss://imm-test/testcases/watermarktestbefore.jpg |
Notification | Notification | No | The notification settings. For information about the asynchronous notification format, see Asynchronous message examples. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "4A7A2D0E-D8B8-4DA0-8127-EB32C6600ADE",
"EventId": "27C-1jyAP5qQI7RoI8lFFwvMrWtl0ft",
"TaskId": "DecodeBlindWatermark-78ac8f3b-59e0-45a6-9b67-32168c3f22b9"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|