ImageGear for C and C++ on Linux v19.10 - Updated
IG_IP_rotate_multiple_90_opt
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Image Processing Functions > IG_IP_rotate_multiple_90_opt

This function will rotate the image referenced by hIGear at an angle that is a multiple of 90 degrees, using additional rotation options.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_IP_rotate_multiple_90_opt(
   HIGEAR hIGear,
   AT_MODE nMult_90_Mode,
   LPAT_ROTATE_MULTIPLE_90_OPTIONS lpRotateOptions
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle of image to rotate.
nMult_90_Mode AT_MODE A constant that specifies rotation angle. See enumIGRotationValues.
lpRotateOptions LPAT_ROTATE_MULTIPLE_90_OPTIONS Pointer to AT_ROTATE_MULTIPLE_90_OPTIONS structure, which contains additional rotation options. NULL means the same behavior as IG_IP_rotate_multiple_90.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Example:

 
Copy Code
HIGEAR hIGear;            // HIGEAR handle of the image
AT_ERRCOUNT nErrcount;    // Count of errs on stack upon ret from func
AT_ROTATE_MULTIPLE_90_OPTIONS rotateOptions = {TRUE}; // Rotation options

// Load image file "picture.bmp" from working directory
nErrcount = IG_load_file("picture.bmp", &hIGear);
if(nErrcount == 0)
{
    nErrcount = IG_IP_rotate_multiple_90_opt(hIGear, IG_ROTATE_90, &rotateOptions);
    // ...
    // Destroy the image
    IG_image_delete(hIGear);
}

Remarks:

The function rotates the image about its center point, using additional options.

If the rotation is either 90 or 270 degrees, the previous width of the image becomes the new height, and the previous height of the image becomes the new width. IG_ROTATE_0 does nothing and is included for completeness only.

To rotate by an arbitrary angle that may not be a multiple of 90 degrees, use IG_IP_rotate_any_angle_ex.