Exporting sections of a grid as a PNG [RESOLVED]

Hey there! Excellent tool! I love using this thing.

However I’ve come to a bit of a problem, I want to export my file as a PNG - I know how to export the entire thing, however I want to just export small sections of the grid Into separate png files (these sections are rooms similar to the overworld view in legend of Zelda style games)

Is there anyway I can do this other than exporting the entire thing, then cutting it up in photoshop? This is my go to approach but I’ve had to start changing areas and this has become a bit of a hassle to do.

Maybe some sort of command line I could try - has anyone had to do something like this before?

This is currently not possible. Though there of course ways to automate cutting up the image on the command-line, like using ImageMagick, I imagine this could also be a feature of the tmxrasterizer tool shipped with Tiled.

Also, once there is support for custom grids in Tiled, these grids could be used for generation of multiple images.

1 Like

Ah! That’s a shame, but thank for the quick response. I’ll check out the other options you pointed out. Thanks for the help

If you will use imagemagick (which can be really-really timesaver in making tiles and other work with multiple sprites) the command line will be like this:

convert input_file.png -crop 10x10@ +repage +adjoin output_file.png

This will crop your big image into 100 pieces (10x10), of course you can change this number.

1 Like

Ah! Actually, I managed to get round this by quickly making a photoshop
macro. I check for the overall size of the image, it then saves then crops
the image down to the size of each screen and saves those images as PNG
files into a folder. I’ll happily share the code if people are interested.