Crop Image
POST
https://picnie.com/api/v1/crop-imageCrop an image to specified dimensions, controlling the crop area with vertical and horizontal origins.
Headers
| Name | Type | Description |
|---|---|---|
Authorization* | string | Pass api key in the authorization field Example: |
Body Parameters
| Name | Type | Description |
|---|---|---|
project_id* | integer | The ID of the project. Example: |
image_url* | string | URL of the image to crop. Example: |
height* | string | Height of the cropped image in pixels. Example: |
width* | string | Width of the cropped image in pixels. Example: |
vertical_crop_from | string | Vertical crop origin. Values: top, bottom, center (default). Example: |
horizontal_crop_from | string | Horizontal crop origin. Values: left, right, center (default). Example: |
Notes
⚠️ Authentication required
curl -X POST "https://picnie.com/api/v1/crop-image"
-H "Authorization: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"image_url": "https://picnie.s3.ap-south-1.amazonaws.com/user_1/project_8/ts_20240124094059image_ex.png",
"height": "720",
"width": "1080",
"project_id": 25,
"vertical_crop_from": "bottom",
"horizontal_crop_from": "center"
}'Responses
200200 OK
{
"error": false,
"message": "Success",
"url": "https://picnie.s3.ap-south-1.amazonaws.com/user_10/project_25/rs_8080_250619093017.png"
}