Indexcropping
You can edit code on OBS Console or make an API call to indexcrop images.
Set the top left corner of the image as the starting point. Set x-axis overlapping with the width, and y-axis overlapping with the height. Crop the image into several consecutive partitions horizontally or vertically, each having equal width or height. Get the partition you want according to the index. Table 1 describes the parameters.
This operation is represented by indexcrop.
Parameter |
Value Description |
Code Example |
---|---|---|
x |
Width of each partition in horizontal cropping, ranging from 1 to Original image width. x and y cannot be chosen at the same time. |
image/indexcrop,x_1000,i_0 |
y |
Height of each partition in vertical cropping, ranging from 1 to Original image height. x and y cannot be chosen at the same time. |
|
i |
If there are n partitions in total, the value of i ranges from 0 to n–1. When i is set to 0, you obtain the first partition. If you set i to a value larger than n–1, the original image will be returned. |
Examples
- Indexcrop an image into partitions with a width of 1000 horizontally and choose the first partition.
- Indexcrop an image into partitions with a width of 600 horizontally and choose the first partition.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot