Media
Aplicar una matriz de transformación afín 2x2 personalizada a una imagen.
Llama a esta herramienta desde tu código en tres lenguajes.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/image-custom-matrix' \
-H 'Content-Type: application/json' \
-d '{"filename":"imageFile.ext","contentType":"application/octet-stream","size":12345}'
# 2) PUT the file bytes directly to the presigned uploadUrl
curl -X PUT '<presigned uploadUrl>' \
--data-binary @/path/to/file.ext
# 3) Call the tool, passing the returned storageKey for each file field
curl -X POST 'https://api.elysiatools.com/es/api/tools/image-custom-matrix' \
-F 'imageFile=uploads/2026/01/01/your-tool-1700000000000-abc123.ext' \
-F 'm00=1.0' \
-F 'm01=0.0' \
-F 'm10=0.0' \
-F 'm11=1.0' \
-F 'background=transparent' \
-F 'format=original' \
-F 'quality=95'Envía una petición POST con tus entradas en JSON. Los parámetros de tipo archivo requieren una subida previa.
POST https://api.elysiatools.com/es/api/tools/image-custom-matrix| Nombre | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| imageFile | filesubida requerida | Sí | Suba cualquier archivo de imagen (JPEG, PNG, WebP, GIF, BMP, TIFF) para la transformación de matriz personalizada |
| m00 | number | Sí | Top-left value of the 2×2 transformation matrix (affects X scaling and rotation) |
| m01 | number | Sí | Top-right value of the 2×2 transformation matrix (affects X shear and rotation) |
| m10 | number | Sí | Bottom-left value of the 2×2 transformation matrix (affects Y shear and rotation) |
| m11 | number | Sí | Bottom-right value of the 2×2 transformation matrix (affects Y scaling and rotation) |
| background | text | No | Color de fondo para áreas transparentes (hex #RRGGBB o #RRGGBBAA, o nombre de color) |
| format | select | No | Elija el formato de salida o mantenga el original. Se recomienda PNG para transparencia |
| quality | number | No | Calidad de salida para formatos con pérdida (JPEG, WebP). Mayor = mejor calidad pero mayor tamaño de archivo |
Resultado de archivo
{
"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)"
}Añade esta herramienta a tu servidor Model Context Protocol para que los agentes de IA puedan listarla y llamarla.
Añade este bloque a la configuración de tu cliente MCP:
{
"mcpServers": {
"elysiatools-image-custom-matrix": {
"name": "image-custom-matrix",
"description": "Aplicar una matriz de transformación afín 2x2 personalizada a una imagen.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-custom-matrix",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Tras conectar al endpoint SSE, lista las herramientas expuestas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoca la herramienta por su id; los argumentos se construyen a partir de sus parámetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-custom-matrix",
"arguments": {
"imageFile": "https://example.com/file.ext",
"m00": "1.0",
"m01": "0.0",
"m10": "0.0",
"m11": "1.0",
"background": "transparent",
"format": "original",
"quality": 95
}
}
}¿Dudas o problemas? Contacta con [email protected]