Available in LEADTOOLS Document and Medical Imaging toolkits.
Deskew example for C++ 4.0 and later
This example automatically straightens the bitmap and repaints the image. The image to be straightened should be mainly text.
m_LEAD1.Deskew(RGB(0,255,0));m_LEAD1.ForceRepaint();