Media
Redimensionner les images GIF aux dimensions spécifiées tout en conservant animation et qualité
Appelez cet outil depuis votre code en trois langages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/gif-to-resized-gif' \
-F 'file=@/path/to/gifFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/fr/api/tools/gif-to-resized-gif' \
-F 'gifFile=/path/to/file.ext' \
-F 'resizeMode=percent' \
-F 'width=0' \
-F 'height=0' \
-F 'scalePercent=85' \
-F 'maintainAspectRatio=true' \
-F 'interpolation=lanczos3' \
-F 'multiFrameHandling=preserve-animation'Envoyez une requête POST avec vos entrées en JSON. Les paramètres de type fichier nécessitent un upload préalable.
POST https://api.elysiatools.com/fr/api/tools/gif-to-resized-gif| Nom | Type | Requis | Description |
|---|---|---|---|
| gifFile | fileupload requis | Oui | — |
| resizeMode | select | Non | — |
| width | number | Non | — |
| height | number | Non | — |
| scalePercent | number | Non | — |
| maintainAspectRatio | checkbox | Non | — |
| interpolation | select | Non | — |
| multiFrameHandling | select | Non | — |
Résultat fichier
{
"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)"
}Ajoutez cet outil à votre serveur Model Context Protocol pour que les agents IA puissent le lister et l'appeler.
Ajoutez ce bloc à la configuration de votre client MCP :
{
"mcpServers": {
"elysiatools-gif-to-resized-gif": {
"name": "gif-to-resized-gif",
"description": "Redimensionner les images GIF aux dimensions spécifiées tout en conservant animation et qualité",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=gif-to-resized-gif",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Après connexion au point d'accès SSE, listez les outils exposés :
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Appelez l'outil par son id ; les arguments sont construits à partir de ses paramètres :
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "gif-to-resized-gif",
"arguments": {
"gifFile": "https://example.com/file.ext",
"resizeMode": "percent",
"width": 0,
"height": 0,
"scalePercent": 85,
"maintainAspectRatio": true,
"interpolation": "lanczos3",
"multiFrameHandling": "preserve-animation"
}
}
}Des questions ou un problème ? Contactez [email protected]