First open your image in your graphic edit program like Gimp or Photoshop.If you picture is not level, simply do select/all, use the select tool in Photoshop to rotate the image until it is level. In Gimp you will select all as well, click on the rotation tool, click on the image and rotate it with the cursor until you are satisfied. You'll then have to click on "rotate" in the dialog box in order for the changes to be set.
Second, use the square select tool and make a square box around the actual image.
Third, crop. In Photoshop go to: image/crop. In Gimp go to: image/crop to selection.
Lastly you might want to flip the image since most viewfinders show a reverse image of the original. You don't have to but if you want here's how to do it. In Photoshop go to: Image/rotate/flip horizontally. In Gimp go to: image/transform/flip horizontally.