ImageGear for C and C++ on Windows v19.5 - Updated
IG_IP_deskew_angle_find
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_deskew_angle_find

This function determines the skew angle of a 1-bit document image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_deskew_angle_find (
        HIGEAR hIGear, 
        LPDOUBLE lpAngle
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image.
lpAngle LPDOUBLE Far pointer to a DOUBLE variable that will receive the skew angle.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

Indexed RGB – 1 bpp;
Grayscale – 1 bpp.

Sample:

Image Processing

Example:

 
Copy Code
HIGEAR hIGear;  /* HIGEAR handle of image    */
DOUBLE dblDeskewAngle;  /* Amount of skew in lpRect returned  */
AT_ERRCOUNT  nErrcount;  /* will tally any IG errors  */
nErrcount = IG_IP_deskew_angle_find ( hIGear, &dblDeskewAngle );

Remarks:

The angle is returned via the pointer lpAngle. You may then use the value of lpAngle with IG_IP_rotate_any_angle() function in order to straighten the image.