Indexed slice

Updated at:

The indexed slice operation divides an image into segments of a specified length along the x-axis or y-axis. You can then extract a specific area by specifying an index.

Parameters

Parameter

Description

Value

ic

Format: [length]x-[index]ic or [length]y-[index]ic.

  • length: The length of the slice.

  • index: Specifies the number of blocks.

The `x` indicates a horizontal slice along the x-axis. The `y` indicates a vertical slice along the y-axis.

length: An integer in the range of [1, length of the sliced edge]. The unit is px.

index: An integer in the range of [0, maximum number of segments). The value 0 indicates the first segment. The maximum number of segments is automatically calculated based on the slicing rule.

Note

If the value is out of range, the original image is returned.

Usage notes

If the specified index exceeds the number of available segments, the original image is returned.

Examples