{"category":"image","endpoint":"https://setget.net/v1/tools/image-crop","examples":[{"input":{"height":120,"image":"sample.jpg","width":200,"x":40,"y":20},"title":"Cut out a rectangle"},{"input":{"aspect":"1:1","image":"sample.jpg"},"title":"Largest centred square"},{"input":{"aspect":"16:9","gravity":"top","image":"sample.png"},"title":"16:9 from the top"}],"input_schema":{"additionalProperties":false,"properties":{"aspect":{"description":"Crop to this shape instead of a size, written width:height, for example 16:9 or 1:1. The largest area of that shape is kept.","examples":["16:9"],"maxLength":20,"type":"string"},"gravity":{"default":"center","description":"Which part to keep when x or y is not given.","enum":["center","top","bottom","left","right"],"type":"string"},"height":{"description":"Height of the crop in pixels.","examples":[120],"minimum":1,"type":"integer"},"image":{"description":"The image to crop.","format":"setget-file","type":"string","x-accept":["image"]},"width":{"description":"Width of the crop in pixels.","examples":[200],"minimum":1,"type":"integer"},"x":{"description":"Left edge of the crop, in pixels from the left of the image. Leave empty to place the crop by gravity.","examples":[40],"minimum":0,"type":"integer"},"y":{"description":"Top edge of the crop, in pixels from the top of the image. Leave empty to place the crop by gravity.","examples":[20],"minimum":0,"type":"integer"}},"required":["image"],"type":"object"},"keywords":["crop","cut","trim","aspect ratio","square","16:9","cut out","crop gif","crop photo"],"related":["image-resize","image-thumbnail","image-pad","image-rotate-flip"],"slug":"image-crop","summary":"Crop an image to a rectangle in pixels, or to an aspect ratio such as 16:9 or 1:1 around its centre or an edge.","tier":"job","timeout_seconds":120,"title":"Crop image","url":"https://setget.net/tools/image-crop"}
