v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-03-0936575.8 KB
Image Processing

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.

get/images/crop

Query parameters

image_urlstring uri
Example:https://images.openfoodfacts.org/images/products/541/004/104/0807/3.jpg

The URL of the input image

y_minnumber

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.

x_minnumber

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.

y_maxnumber

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.

x_maxnumber

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.

Response

Cropped image in JPEG format