This document helps you understand indexed slice.
Operation Scenarios
ZOS supports indexed slice. You can configure parameters to slice an image stored in ZOS into partitions of specified size and return the desired partition.
Constraints and Restrictions
For general limitations on the source format, file size, and image resolution, see Image Processing Overview - Image Restrictions.
For regions supporting indexed slice, see Product Capability Map.
Description
Operator: indexcrop
Parameter Name | Purpose | Value | Required |
x | Specifies the length of the cropped partition along the x-axis. | [1,image width] | No, but x or y must be specified. |
y | Specifies the length of the cropped partition along the y-axis. | [1,image height] | No, but x or y must be specified. |
i | Specifies the index, indicating the image partition returned after slicing. The index number starts from 0, and 0 indicates to return the first partition. | [0,partition count) | Yes |
Example
Example: A 1,920 px*1,080 px image is cropped along the x-axis and y-axis, respectively.
Crop the image along the x-axis with an interval of 200 px:
The resulting image is divided into 10 partitions; the last partition is 120 px wide, others are 200 px wide.
To return the second partition: the specific request parameter is image/indexcrop,x_200,i_1.
Crop the image along the y-axis with an interval of 200 px:
The resulting image is divided into 6 partitions; the last partition is 80 px high, others are 200 px high.
To return the fifth partition, the specific request parameter is image/indexcrop,y_200,i_4.