Crop an image
This endpoint is currently only used to generate cropped logos on Hunger Games from a base image and cropping coordinates. Cropping coordinates are relative (between 0. and 1. inclusive), with (0, 0) being the upper left corner.
Query Parameters
The URL of the input image
uri
The minimum y-coordinate for cropping, relative to the image height. We use relative coordinates, with (0, 0) being the upper left corner and (1, 1) being the lower right corner.
0 <= value <= 1
The minimum x-coordinate for cropping, relative to the image width. We use relative coordinates, with (0, 0) being the upper left corner and (1, 1) being the lower right corner.
0 <= value <= 1
The maximum y-coordinate for cropping, relative to the image height. We use relative coordinates, with (0, 0) being the upper left corner and (1, 1) being the lower right corner.
0 <= value <= 1
The maximum x-coordinate for cropping, relative to the image width. We use relative coordinates, with (0, 0) being the upper left corner and (1, 1) being the lower right corner.
0 <= value <= 1
Response Body
curl -X GET "https://robotoff.openfoodfacts.org/api/v1/images/crop?image_url=https%3A%2F%2Fimages.openfoodfacts.org%2Fimages%2Fproducts%2F541%2F004%2F104%2F0807%2F3.jpg&y_min=1&x_min=1&y_max=1&x_max=1"
"string"