DeskewHelper sharewareScreenshot 

DeskewHelper allows automatic skew detection and correction. The steps used to deskew an image are: Calculate the slope of the document Compute the rotation angle Calculate the size of a new image large enough to hold the rotated image Allocate the new image Rotate the entire image

 

Screenshot of DeskewHelper