All Products
Search
Document Center

Intelligent Media Management:CreateImageSplicingTask

Last Updated:Jan 27, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:CreateImageSplicingTask

create

*Project

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}

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. ${Bucket} is the name of the OSS bucket that is in the same region as the project. ${Object} is the full path of the file, including the file name extension.

Supported image formats: JPG and PNG.

oss://examplebucket/sampleobject.jpg

Rotate

integer

No

The rotation angle of the image. Valid values:

  • 0 (default)

  • 90

  • 180

  • 270

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:

  • jpg (default)

  • png

  • webp

Valid values:

  • jpg :

    jpg

  • png :

    png

  • webp :

    webp

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 (default): Stitches images vertically. The widths of all images must be the same.

  • horizontal: Stitches images horizontally. The heights of all images must be the same.

vertical

ScaleType

string

No

The scaling method used when the width or height of an image is aligned. Valid values:

  • fit (default): Scales the image without adding black bars. Only proportional scaling is supported.

  • stretch: Stretches the image to fill the space.

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.

  • If you set Direction to vertical, this parameter specifies the width alignment.

  • If you set Direction to horizontal, this parameter specifies the height alignment.

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 Padding and Margin. The value can be in the #FFFFFF format or a keyword such as red or alpha.

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.