ImageGear for C and C++ on Windows v19.1 - Updated
Rotate and Flip
User Guide > How to Work with... > OCR > How to... > Prepare the Input > Enhance Image Quality > Rotate and Flip

Image rotation in multiples of 90º can be done on any image type (bi-tonal, grayscale, or color).

The function IG_REC_image_orient() immediately rotates and/or mirrors a whole single image in the recognition engine's memory space. Seven combinations of rotation and mirroring are available. This function ignores the image rotation mode setting of the recognition engine. The transformed image replaces the original one, keeping its type and format. It remains in the recognition engine's memory space, but is available to the application.

A rotation mode setting is made with IG_REC_orientation_mode_set(), taking values from enumIGRecImgRotate. These are:

This mode-induced rotation is performed whenever IG_REC_image_preprocess() is called. When a fixed value is given (e.g., IG_REC_IMG_ROTATE_RIGHT), the original image is rotated.

When IG_REC_IMG_ROTATE_AUTO is set, grayscale or color images undergo an implicit secondary conversion to create a clean bi-tonal image. If IG_REC_IMG_ROTATE_AUTO is set and despeckle mode is ON for a bi-tonal image with over 280 dpi, a despeckled bi-tonal image is created. Orientation detection is done on the bi-tonal image - the despeckled one, if available. This bi-tonal image is not available to the application. The required rotation is performed on the original image. In both cases, the original rotated image remains in the recognition engine's memory space and is available to the application.