This topic describes the parameters and examples to perform indexed cut.

Precautions

If the specified index exceeds the cut range, the system returns the source image.

Parameters

Operation name: indexcrop

The following table lists the parameters.

Parameter Description Valid value
x The length of each image partition during horizontal cutting. One of the x and y parameters must be used. [1, image width].
y The length of each image partition during vertical cutting. One of the x and y parameters must be used. [1, image height].
i The image partition selected after cutting. A value of 0 indicates the first partition. [0, maximum partition quantity). If the maximum partition quantity exceeds the cut range, the system returns the source image.

Examples

  • Divide an image equally by 100 px along the horizontal axis. Retrieve the first partition.

    The URL used to process the image is in the following format: <Source image URL>? x-oss-process=image/indexcrop,x_100,i_0

  • Divide an image equally by 100 px along the horizontal axis. Retrieve the 100th partition. The source image is returned because the maximum partition quantity exceeds the cut range.

    The URL used to process the image is in the following format: <Source image URL>? x-oss-process=image/indexcrop,x_100,i_100