Working on a Tile Placing tool for G'MIC-QT

Insomnia has given me time. The best way to figure it out is to step through the process methodically and see where it fails to draw the image. It likely has to do with your management of alpha, which to be honest almost no one uses the way you do. Sure enough if I make the sample image rgba, tiles don’t appear on the canvas when drawn.

gmic sp tiger to_rgba foo_r tile.png

I don’t have your tile set, so I retrieved one from Ancient Civilization Ruins - RPG TileSet Free Curated Assets for your RPG Maker MV Games!. Here is my experience. To begin, here is what I get visually.

Immediately, there are several differences from your screenshot above.

The relative window sizes are different. Could be due to my screen size. With a command like this, controlling and standardizing window size might be important to the user.

Starting with the most obvious, the tile window is much larger than yours. Tileset is smaller than tile.png, which is okay because I can go left, right, up and down; but scrolling by key stroke doesn’t always work as expected and the refresh flickers a lot. The selection box is off in size, aspect ratio and position likely because of your defaults.

Another difference is the alpha only spots are magenta, while yours is white in the tileset window and black in the canvas. As you can see, the magenta also around the tiger: why is there an extra transparent padding around the tiger? It doesn’t seem to belong to the canvas.

One last issue is the final window that pops up. The image has dimensions larger than the input image, which isn’t expected and likely wrong. The tiger is nowhere to be seen and the padding is gone. Only the drawn tiles are there. Early days. :slight_smile:

PS On second thought, the larger dimensions are due to the padding. I guess it has to do with the input image and the tile grid not matching but even so the image should probably be cropped rather than have an odd border around it…