Media
Décode les photos HEIC en PNG vérifiés 24/32 bits ou haute précision 48/64 bits.
Appelez cet outil depuis votre code en trois langages.
# 1) Request a presigned URL → returns { uploadUrl, storageKey }
curl -X POST 'https://api.elysiatools.com/api/upload/presign/heic-to-png' \
-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/fr/api/tools/heic-to-png' \
-F 'imageFile=./public/samples/image-bit-depth/source-heic.heic' \
-F 'outputMode=rgb-24' \
-F 'backgroundColor=#ffffff' \
-F 'preserveMetadata=true'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/heic-to-png| Nom | Type | Requis | Description |
|---|---|---|---|
| imageFile | fileupload requis | Oui | — |
| outputMode | select | Non | — |
| backgroundColor | color | Non | — |
| preserveMetadata | checkbox | 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-heic-to-png": {
"name": "heic-to-png",
"description": "Décode les photos HEIC en PNG vérifiés 24/32 bits ou haute précision 48/64 bits.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=heic-to-png",
"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": "heic-to-png",
"arguments": {
"imageFile": "./public/samples/image-bit-depth/source-heic.heic",
"outputMode": "rgb-24",
"backgroundColor": "#ffffff",
"preserveMetadata": true
}
}
}Des questions ou un problème ? Contactez [email protected]