Media
Aplicar uma matriz de transformação afim 2x2 personalizada a uma imagem.
Chame esta ferramenta a partir do seu código em três idiomas.
# 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/pt/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'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/image-custom-matrix| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| imageFile | fileupload necessário | Sim | Carregue qualquer arquivo de imagem (JPEG, PNG, WebP, GIF, BMP, TIFF) para transformação de matriz personalizada |
| m00 | number | Sim | Top-left value of the 2×2 transformation matrix (affects X scaling and rotation) |
| m01 | number | Sim | Top-right value of the 2×2 transformation matrix (affects X shear and rotation) |
| m10 | number | Sim | Bottom-left value of the 2×2 transformation matrix (affects Y shear and rotation) |
| m11 | number | Sim | Bottom-right value of the 2×2 transformation matrix (affects Y scaling and rotation) |
| background | text | Não | Cor de fundo para áreas transparentes (hex #RRGGBB ou #RRGGBBAA, ou nome da cor) |
| format | select | Não | Escolha o formato de saída ou mantenha o original. PNG recomendado para transparência |
| quality | number | Não | Qualidade de saída para formatos com perdas (JPEG, WebP). Superior = melhor qualidade, mas maior tamanho de arquivo |
Resultado de arquivo
{
"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)"
}Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-image-custom-matrix": {
"name": "image-custom-matrix",
"description": "Aplicar uma matriz de transformação afim 2x2 personalizada a uma imagem.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-custom-matrix",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus 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
}
}
}Dúvidas ou problemas? Contate [email protected]