I was just experimenting with changing the shape of a photo of my painting that I did not get straight. It wasn't hard to do in PhotoShop so I thought I would share the process with you.
Here is the original:
Here is the transformed one:
The first thing you have to do is create a duplicate layer of the picture. Then click on the original layer and click on the "eye" to make that layer invisible in the work space. Expand the work space so there is a wide border around the picture.
Re-select the duplicate layer and then go to "Edit" and scroll down to "Free Transform" or (Control T) and select it.
A box appears around the picture with small squares at the corners and sides. If you move your mouse outside the box, you will see curved arrows. Hold the left mouse button on the appropriate arrow and rotate the picture to initially straighten it.
Next move inside the box along the side and hold the left mouse button over a double arrow where you want to stretch one side. Once you are satisfied, click the "Select" tool and tell it to apply the changes.
If you want to stretch just one corner to even up the edges without cropping, hold "shift" and "control" while you hold the left mouse button down and drag the corner square in the direction you want the corner edge to move.
Here the edges are squared up.
You can re-size the picture by holding the left mouse button over any of the squares on the corners or sides of the box. Here is an example of changing the height while not doing anything to the width.
Once you are satisfied, delete the original layer and save the file under a new name if you don't want to write over the original photo.