Embeds specific textual information into an image as watermarks. These watermarks are visually imperceptible and do not affect the aesthetics of the image or the integrity of the original data. The watermarks can be extracted by using the CreateDecodeBlindWatermarkTask operation.
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 .
- You can embed only text as blind watermarks to an image.
- The format of the output image is the same as that of the input image.
- The watermarks can still be extracted even if attacks, such as compression, scaling, cropping, rotation, and color transformation, are performed on the image.
- Pure black and white images and images with low resolution (roughly less than 200 px × 200 px,) are not supported.
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:EncodeBlindWatermark | none | *Project acs:imm:{#regionId}:{#accountId}:project/{#ProjectName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | The name of the project. For more information, see CreateProject . | test-project |
SourceURI | string | Yes | The Object Storage Service (OSS) URI of the image. Specify the value in the oss://${Bucket}/${Object} format. Supported image formats: JPG, PNG, BMP, TIFF, and WebP. Image size limit: 10,000 px maximum and 80 px x 80 px minimum. | oss://test-bucket/test-object.jpg |
TargetURI | string | Yes | The URI of the output image in OSS. Specify the URI in the oss://${Bucket}/${Object} format, where Note
| oss://test-bucket/target-object.jpg |
Content | string | No | The text content of watermarks. It can be up to 256 characters in length. | |
StrengthLevel | string | No | The watermark strength level. The higher the strength, the more resistant the watermarked image is to attacks, but the more the image is distorted. Default value: low. Valid values: [low, medium, high]. | low |
ImageQuality | integer | No | This parameter takes effect only if the input image format is JPG. The storage quality of the output image that carries the watermarks. Default value: 90. Valid values: 70 to 100. The higher the quality, the larger the image size and the higher the watermark resolution quality. | 90 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "8E0DD64B-28C6-4653-8FF7-93E4C234BCF0"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|