Why does exporting to image have its own moon logic?

I don’t get it. You have an export menu and an export to image option as completely separate things, and it only makes usability worse. I want my map to be automatically exported to a png every time I save, which is something I can do for every non-image format export because of this. On top ofexporting to image having an extra click every time I save to overwrite the file.

Please add the image formats as valid output formats for the export. I have no idea why it’s not this way to start with.

Exporting as an image has a bunch of additional parameters that exporting to a map format does not, and I think that gets in the way of merging the image export with the regular export. It should be relatively simple to create an option to repeat the last image export on save, but making images just another map export format would be substantially more work because it’ll require adding capabilities that other map formats don’t have. In particular, MapFormats will need some way to know whether they should show an options dialog or not (a dialog should not be shown when using the CLI, or when repeating an export), and if MapFormats can have additional options like the image export does, then Tiled would need some place to store these.

For now, it is possible to create a custom scripted MapFormat that exports an image, though this won’t be able to easily offer all the options (in particular, the grid and object names options would be challenging). A custom format like this wouldn’t need to worry about the extra UI because it can make assumptions about the settings you want. So, if you need this feature quickly, that may be a good option. You would register a MapFormat whose write() method would use the map’s toImage method to generate an image, and then save that image. The map and fileName are available as parameters to write().

1 Like