Change HighResShot resolution depending on the size of the map?


I have created a procedurally generated map with a top-down orthographic camera using same-sized ‘tiles’, and I need the users to be able to save said maps with a specific size for those tiles. In other words, the screenshot should automatically vary its resolution depending on the size of the map to accomodate, for example, 70px per tile.

Is there any way to achieve this? Maybe somehow counting how many tiles there are horizontally and vertically and calculate the proper resolution that way?
I hope the explanation is not too confusing, any help in the matter would be greatly appreciated. Please let me know if you need more information.

Thank you!