gfx4snes needs indexed images, but artists work in RGB. img2snes is the bridge: it quantises a full-colour PNG down to a SNES-legal indexed palette, so your artwork feeds the rest of the pipeline without hand-editing palettes in an image editor. Run it once on new art, commit the indexed result, and gfx4snes takes it from there.
In: a .png — RGB, RGBA, or already indexed.
Out: a palette-indexed .png (2–256 colours, palette embedded). The default name is <input>_indexed.png.
| Flag | Meaning |
|---|---|
| -i FILE | input image (required) |
| -o FILE | output path (default <input>_indexed.png) |
| -c N | number of colours, 2–256 (16 for 4bpp, 4 for 2bpp, 256 for 8bpp) |
| --round-snes | snap the palette to SNES BGR555 (multiples of 8) — recommended |
| -p FILE | match pixels to an existing PNG's palette (shared palette across sprites) |
| -s FACTOR | nearest-neighbour scale |
| -t N | pad dimensions up to a multiple of N (e.g. 8) |
| --batch | treat the input as a glob and convert many files |
Then hand the indexed PNG to gfx4snes — images to tiles, palettes & maps with a matching -u (16 colours → -u 16, etc.).
img2snes is the very first box in the The OpenSNES toolbox pipeline: RGB art → indexed PNG → gfx4snes — images to tiles, palettes & maps → tiles/palette/map. If your source art is already indexed (pixel-art tools often export that way), you can skip it entirely.