GIMP has a perspective tool that can easily correct images. Here's how to use it and some tips to get the image right.
Correcting perspective distortion
How to fix perspective in GIMP - Quora
How to Straighten a Photo With GIMP
vaes9: Perspective correction using GIMP
Photo perspective correction with the GIMP - FSDeveloper Wiki
How to Correct Lens Distortion in GIMP
What is Lens Distortion and How to Correct It in GIMP
Barrel Distortion: Lens Distortions Unveiled
vaes9: Perspective correction using GIMP
Lens Distortion in Photography: A Quick Guide
How to Correct a Photo's Perspective Distortion With GIMP
remove keystoning from painting photos
Perspective Distortion – Pixelbath