All Products
Search
Document Center

Intelligent Media Management:EncodeBlindWatermark

Last Updated:Dec 13, 2024

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
imm:EncodeBlindWatermarknone
*Project
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project. For more information, see CreateProject .

test-project
SourceURIstringYes

The Object Storage Service (OSS) URI of the image.

Specify the value in the oss://${Bucket}/${Object} format. ${Bucket} specifies the name of the OSS bucket that resides in the same region with the current project. ${Object} specifies the path of the object with the extension included.

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
TargetURIstringYes

The URI of the output image in OSS.

Specify the URI in the oss://${Bucket}/${Object} format, where ${Bucket} is the name of the bucket in the same region as the current project and ${Object} is the path of the object with the extension included.

Note
  • The format of the output image is the same as that of the input image.
oss://test-bucket/target-object.jpg
ContentstringNo

The text content of watermarks. It can be up to 256 characters in length.

StrengthLevelstringNo

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
ImageQualityintegerNo

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

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

8E0DD64B-28C6-4653-8FF7-93E4C234BCF0

Examples

Sample success responses

JSONformat

{
  "RequestId": "8E0DD64B-28C6-4653-8FF7-93E4C234BCF0"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history