Creates an image splicing task. You can call this operation to splice multiple images into one based on a given rule and save the final image into an Object Storage Service (OSS) bucket.
Operation description
- Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****
- Make sure that the project that you want to use exists in the current region. For more information, see Project management.
- You can call this operation to splice up to eight images. Each side of an image cannot exceed 32,876 pixels, and the total number of pixels of the image cannot exceed 1 billion.
- The CreateImageSplicingTask operation is an asynchronous operation. After a task is executed, the task information is saved only for seven days. When the retention period elapses, the task information is no longer retrievable. You can call the GetTask or ListTasks to query information about the task.`` If you specify Notification , you can also 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:CreateImageSplicingTask | create | *Project acs:imm:{#regionId}:{#accountId}:project/{#ProjectName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | The name of the project. You can obtain the name of the project from the response of the CreateProject operation. | test-project |
Sources | array<object> | Yes | The input images. The images are sliced in the order of the input image URIs. | |
object | Yes | The input image. | ||
URI | string | Yes | The Object Storage Service (OSS) bucket in which you store the input images. Specify the value in the oss://${Bucket}/${Object} format. The following image formats are supported: jpg and png. | oss://examplebucket/sampleobject.jpg |
Rotate | long | No | The rotation angle. Valid values:
| 90 |
TargetURI | string | Yes | The OSS bucket in which you want to store the output image. Specify the value in the oss://${bucketname}/${objectname} format. ${bucketname} specifies the name of the OSS bucket that resides in the same region as the current project. ${objectname} specifies the path to the output image. | oss://examplebucket/outputImage.jpg |
ImageFormat | string | No | The compression format of the output image. Valid values:
| jpg |
Quality | long | No | The compression quality of the output image. This parameter takes effect only for JPG and WebP images. Valid values: 0 to 100. Default value: 80. | 80 |
Direction | string | No | The splicing method. Valid values:
| vertical |
ScaleType | string | No | The scaling mode of the input images that are vertically or horizontally aligned. Valid values:
| stretch |
Align | long | No | The width or height with which the input images must align. Valid values: 1 to 4096. Unit: px.
Note
If you do not specify this parameter, the width or height of the first input image is used.
| 192 |
Padding | long | No | The space between component images in the output image. Default value: 0. Unit: px. | 2 |
Margin | long | No | The empty space or border around the edges of the output image. Default value: 0. Unit: px. | 2 |
BackgroundColor | string | No | The padding color of the spaces specified by | red |
UserData | string | No | The user data, which is returned as asynchronous notifications to help manage notifications within your system. The maximum length of the user data is 2,048 bytes. | test-data |
CredentialConfig | CredentialConfig | No | The authorization chain. For more information, see Use authorization chains to access resources of other entities. | |
Tags | object | No | The custom tags. You can search for or filter asynchronous tasks by custom tag. | { "User": "Jane" } |
Notification | Notification | No | The notification settings. For more information, click Notification. For information about the asynchronous notification format, see Asynchronous notification format. |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "94D6F994-E298-037E-8E8B-0090F27*****",
"EventId": "10C-1R6p7Km0H5Ieg38LKXTIvw*****",
"TaskId": "ImageSplicing-537cc157-7645-444a-a631-c8db4d02*****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-04-03 | The request parameters of the API has changed | View Change Details |
2023-03-09 | The request parameters of the API has changed | View Change Details |
2022-08-16 | The request parameters of the API has changed | View Change Details |
2022-08-16 | The request parameters of the API has changed | View Change Details |