Stitches multiple images into a single image based on specified rules and saves the output to a specified OSS object.
Operation description
Before you call this operation, make sure that you understand the billing methods and pricing of Intelligent Media Management.
Before you call this operation, ensure that an active project exists in the current region. For more information, see Project management.
You can stitch a maximum of 10 images in this operation. The length of a single edge of each image cannot exceed 32,876 pixels. The total number of pixels cannot exceed 1 billion.
This is an asynchronous operation. After a task starts, its information is saved for 7 days. After this period, you can no longer query the task information. To query task information, call the GetTask or ListTasks operation and use the returned
TaskId. You can also set the Notification parameter to receive asynchronous notifications about the task.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateImageSplicingTask |
create |
*Project
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The project name. For more information about how to obtain the project name, see Create a project. |
test-project |
| Sources |
array<object> |
Yes |
The list of input images. The images are stitched in the order of their URIs in the list. |
|
|
object |
No |
The information about an input image. |
||
| URI |
string |
Yes |
The OSS URI of the source image. The URI must be in the oss://${Bucket}/${Object} format. Supported image formats: JPG and PNG. |
oss://examplebucket/sampleobject.jpg |
| Rotate |
integer |
No |
The rotation angle of the image. Valid values:
|
90 |
| TargetURI |
string |
Yes |
The OSS URI where the output image is stored. The URI must be in the oss://${bucketname}/${objectname} format. ${bucketname} is the name of the OSS bucket that is in the same region as the project. ${objectname} is the path of the file, including the file name. |
oss://examplebucket/outputImage.jpg |
| ImageFormat |
string |
No |
The compression format of the output image. Valid values:
Valid values:
|
jpg |
| Quality |
integer |
No |
The compression quality of the output image. This parameter is valid only for JPG and WebP images. The value range is 0 to 100. The default value is 80. |
80 |
| Direction |
string |
No |
The image stitching method. Valid values:
|
vertical |
| ScaleType |
string |
No |
The scaling method used when the width or height of an image is aligned. Valid values:
|
stretch |
| Align |
integer |
No |
The alignment value, in pixels, for the width or height of the images to be stitched. The value can range from 1 to 4096.
Note
If you do not specify this parameter, the width or height of the first image is used for alignment by default. |
192 |
| Padding |
integer |
No |
The space, in pixels, between sub-images in the stitched image. The default value is 0. |
2 |
| Margin |
integer |
No |
The blank margin, in pixels, of the stitched image. The default value is 0. |
2 |
| BackgroundColor |
string |
No |
The fill color for the areas specified by |
red |
| UserData |
string |
No |
The custom information. This information is returned in the asynchronous notification message. Use this information to associate the notification message with your system. The maximum length is 2,048 bytes. |
test-data |
| CredentialConfig | CredentialConfig |
No |
The chained authorization configuration. For more information, see Use chained authorization to access resources of other entities. |
|
| Tags |
object |
No |
Custom tags used to search for and filter asynchronous tasks. |
{ "User": "Jane" } |
| Notification | Notification |
No |
The message notification configuration. For information about the format of asynchronous notification messages, see Asynchronous notification message format. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The result of image stitching. |
||
| RequestId |
string |
The request ID. |
94D6F994-E298-037E-8E8B-0090F27***** |
| EventId |
string |
The event ID. |
10C-1R6p7Km0H5Ieg38LKXTIvw***** |
| TaskId |
string |
The task ID. |
ImageSplicing-537cc157-7645-444a-a631-c8db4d02***** |
Examples
Success response
JSON format
{
"RequestId": "94D6F994-E298-037E-8E8B-0090F27*****",
"EventId": "10C-1R6p7Km0H5Ieg38LKXTIvw*****",
"TaskId": "ImageSplicing-537cc157-7645-444a-a631-c8db4d02*****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.