import_image
Places a sketch, scan, painting, photo, or AI image into an OpenToonz layer as raster art or as editable vector strokes and fills.
Instructions
Bring a picture (sketch, scanned drawing, painting, photo, AI image) into a layer.
Raster layer (mode 'raster'): the image is placed as-is. Traced layer (add_layer mode='traced'): OpenToonz's own vectorizer turns it into editable vector strokes and fills on compile. trace: set the traced layer's method once: 'outline' (colour regions) | 'centerline' (ink lines). box [x,y,w,h] px (default whole canvas); fit contain | cover | stretch | none.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scene": "<scene>",
"layer": "<layer>",
"path": "<path>"
},
"name": "import_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | ||
| fit | No | contain | |
| path | Yes | ||
| frame | No | ||
| layer | Yes | ||
| scene | Yes | ||
| trace | No | ||
| accuracy | No | ||
| threshold | No | ||
| max_colors | No | ||
| despeckling | No |