Generating an image from multiple sprites

I really want to implement a feature for my tile-based 2D game where i generate a png of the entire world for players to admire. Would also be good for me to analyze playtesting results.

Anyways, I’ve thought of two vague options and I’m not too sure how well either will work out.

The first is to just create a camera that is somehow configured to see the exact full world and then just save the picture from the camera’s view. I’m not sure this will be an option for me because the world is about 20 times as tall as it is wide.

The second is to create a blank file and somehow write the byte arrays of each sprite into the correct positions in the world image file. I’ve done something sorta like this in java but I’m not sure about how simple it would be in C#/Unity.

Any insight into this problem?

The camera system is definitely the easiest. You can adjust the perspective of the camera to ensure that it matches the world exactly, and if you render it to a rendertexture, you can allow for a variable resolution export.