You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Image processing
Indexcrop
Copy page
Download PDF
Indexcrop
The indexcrop feature allows you to split an image into segments of a specified size and retrieve a specific segment based on an index. The top-left corner is the starting point, with the width as the x-axis and the height as the y-axis. This topic introduces the parameters and provides examples of the indexcrop feature.​
Supported parameters​
​
Parameter​
Description​
Value​
Required​
x​
The length of each segment along the x-axis (width).​
[1,Image width]. You can specify either x or y, but not both.​
Yes​
y​
The length of each segment along the y-axis (height).​
[1,Image height]. You can specify either x or y, but not both.​
Yes​
i​
The number of the segment to retrieve.​
If there are n segments after splitting, then the valid range for i is [0, n-1]. The default value is 0.​
No​
​
Notes​
  • If an image is split into n segments, the valid range for index i is [0, n − 1], where 0 represents the first segment. If the index exceeds the maximum number of segments, the original image is returned.​
  • When both x and y are specified with valid values, the y value takes precedence.​
Examples​
  • Set x to 200 and i to 0.​
  • ​Image​​
  • Set y to 200 and i to 0.​
  • ​Image​​
  • Set both x and y to 200 and i to 0.​
  • ​Image​​
​
Last updated: 2026.02.03 17:51:49