How do you straighten an image in Delphi?

I have always wondred of how they do this magic… straighten an image that is. Well as it turns out, no magical skills is needed. All that is needed is to crop the rotated image. One question, I have not found a fully acceptable answear to yet, is how to calculate this area. My solution […]