pixelize_image
Convert any PNG image into authentic retro pixel art using downsampling, palette quantization, and dithering. Customize scale, palette, and sampling filters.
Instructions
Imports an external image file (PNG) and converts it to authentic 2D retro pixel art with downsampling, palette quantization, and dithering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Pixel art integer scaling factor when saving to output path (default: 4) | |
| dither | No | Whether to apply Bayer ordered dithering to simulate shading gradients (default: true) | |
| palette | No | Retro palette to clamp colors to (default: 'db32') | |
| sampling | No | Downsampling filter: 'average' (best for high-res), 'nearest', or 'bilinear' (default: 'average') | |
| canvas_id | No | Optional canvas ID to register in memory | |
| file_path | Yes | Absolute or relative file path to the source image (e.g. 'assets/hero.png' or 'textures/rock.png') | |
| target_width | No | Target pixel art width (default: 32) | |
| dither_spread | No | Dither intensity spread (default: 0.2) | |
| target_height | No | Target pixel art height (default: 32) | |
| export_output_path | No | Optional file path to automatically export the resulting pixel art PNG to disk |