Normal Cropping
Last Updated:2020-09-29
Overview
This article introduces the rectangular cropping operation on the photo.
Normal Cropping Parameters
Name of action: crop
Parameter | Value | Description |
---|---|---|
x | 0-photo width | Crop the x coordinate of the starting point of the upper left corner relative to the origin, which is not required, and the default value is set as 0. |
y | 0-photo height | Crop the y coordinate of the starting point of the upper left corner relative to the origin, which is not required, and the default value is set as 0. |
w | 1-4096 | If the width of the cropped photo is less than the specified width, the photo width shall prevail. The unit will be px. It is not required, and the default value is the original width of photo. |
h | 1-4096 | If the height of the cropped photo is less than the specified height, the height of the photo shall prevail. The unit will be px. It is not required, and the default value is the original height of photo. |
Example
- Cut the photo 200*200 by taking the (10,10) coordinates as the starting point.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/crop,x_10,y_10,w_200,h_200