gimp_create_document
Create a new empty GIMP image with set width, height, color mode, and background fill. Returns an image ID and layer list so other GIMP tools can edit it like an opened file.
Instructions
Headless GIMP: create a new, empty image from scratch — not from a file (that is gimp_open_document). width/height, mode (rgb/grayscale, default rgb), fill for the single background layer (white/black/transparent, default white), optional precision (16/32-bit, same promotion gimp_open_document's own precision does) and name. Returns the exact same shape gimp_open_document does (image id, dimensions, base type, precision, layer list), so every other gimp_* tool treats it identically to an opened file.
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": {
"width": "<width>",
"height": "<height>"
},
"name": "gimp_create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | The single background layer's initial content. | white |
| mode | No | The new image's base color mode. | rgb |
| name | No | The background layer's name. Defaults to 'Background'. | |
| width | Yes | Canvas width, in pixels. | |
| height | Yes | Canvas height, in pixels. | |
| precision | No | Promote bit depth at creation, same as gimp_open_document's own `precision` — use this ahead of an aggressive tone move to avoid visible banding. Omit for ordinary 8-bit. The megapixel cap this tool enforces scales down with bit depth (a 16-bit request costs 2x the memory of the same pixel count at 8-bit, 32-bit float 4x): 250 MP at 8-bit, 125 MP at 16-bit, 60 MP at 32-bit — the same per-side 30000px limit applies at every depth. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | No | ||
| width | No | ||
| height | No | ||
| layers | No | ||
| base_type | No | ||
| precision | No |