import_image
Convert image files to ASCII art on the canvas. Supports PNG, JPG, GIF, BMP with options for width, charset, color, dithering, and offset.
Instructions
Import an image file and convert it to ASCII art on the canvas. Requires optional "sharp" or "jimp" package for image processing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the image file (.png, .jpg, .gif, .bmp) | |
| targetWidth | No | Target width in characters. If omitted, uses canvas width. | |
| targetHeight | No | Target height in characters. If omitted, maintains aspect ratio. | |
| charset | No | Characters to use for brightness mapping (dark to bright) | .:-=+*#%@ |
| colorMode | No | How to apply colors | foreground |
| dithering | No | Dithering algorithm to use | none |
| frameIndex | No | Frame to import to (defaults to current) | |
| offsetX | No | X offset on canvas | |
| offsetY | No | Y offset on canvas |