take in-game photos

Hello,

I want to make an in-game photo camera and use the scene target 2d to take photos.My question is how can i do it? I cannot figure how to save the result to either a texture2d or as a file on the disk. Any tips would be appreciated.