Image Extract Region
Extract a specific rectangular region from an image by specifying area dimensions and position
API Documentation
Request Endpoint
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| imageFile | file (Upload required) | Yes | Upload any image file (JPEG, PNG, WebP, TIFF) for region extraction |
| extractMode | select | Yes | Choose how to extract region: custom dimensions, center, corner, or percentage |
| width | number | No | Set the extract width. For percentage mode, use 1-100 |
| height | number | No | Set the extract height. For percentage mode, use 1-100 |
| gravity | select | No | Choose where to position the extract area |
| x | number | No | Set the horizontal position for extract area (0 = left edge). Used in custom mode |
| y | number | No | Set the vertical position for extract area (0 = top edge). Used in custom mode |
| format | select | No | Choose output format or keep original |
| quality | number | No | Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size |
File type parameters need to be uploaded first via POST /upload/image-extract-region to get filePath, then pass filePath to the corresponding file field.
Response Format
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}
AI MCP Documentation
Add this tool to your MCP server configuration:
{
"mcpServers": {
"elysiatools-image-extract-region": {
"name": "image-extract-region",
"description": "Extract a specific rectangular region from an image by specifying area dimensions and position",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-extract-region",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.
Supports URL file links or Base64 encoding for file parameters.
If you encounter any issues, please contact us at [email protected]