You can use the built-in editing features in iOS to rotate an image on your iPhone. Open the photo you wish to modify in the Photos app. Go to the Edit menu in the upper-right corner and select Crop to crop an image. After that, you can use the rotate icon at the top left of the screen to rotate the picture till you achieve the proper perspective.