"trim result" option in export window

Exporting via tags or by toggling visible layers can lead to a lot of empty space, so it would be good if there was an option to trim the result in the export window.