You can use indexed cut parameters to cut a source image stored in OSS based on the specified size and retrieve the required image. This topic describes the parameters and examples to perform indexed cut.

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. [0, maximum number of partitions).

By default, the value is 0, which indicates the first partition.

Usage notes

  • If the specified index exceeds that of the cut range, the system returns the source image.
  • If both x and y are specified and their values are valid, the value of y takes effect.

Examples

The image-demo bucket that is located in the China (Hangzhou) region is used as an example. Public endpoint of the image: