The following image modifications can be made here:
Invert, rotate by 90, 180 or 270 degrees, crop black borders and also deskew the image, as follows:
Example of an image before deskew
The same image after deskew and cropping
Automatic skew correction is no problem, even with extremely damaged paper.
There are many setting possibilities, in order to adapt the automatic deskew to different demands: