> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# RotateImageByRotationType Method of the ImageProcessingTools Object

This method rotates an image by a predefined angle (90 degrees clockwise, 90 degrees counterclockwise, upside down). To get the rotation needed to turn the image the right way up, you can use the [**DetectRequiredRotation**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-detectrequiredrotation.md) method.

## Syntax

```vb Visual Basic .NET theme={null}
Function RotateImageByRotationType( _
  Image As Image, _
  Rotation As RotationTypeEnum, _
) As Image
```

```cpp C++ theme={null}
HRESULT RotateImageByRotationType(
  IImage*          Image,
  RotationTypeEnum Rotation,
  IImage**         Result
);
```

## Parameters

**Image**

\[in] This variable refers to the [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md) object which is to be preprocessed.

**Rotation**

\[in] Specifies one of the predefined rotation angles. See the description of the [**RotationTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rotationtypeenum.md) constants.

**Result**

\[out, retval] A pointer to the [**IImage**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md)**\*** pointer variable that provides access to the resulting image.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**ImageProcessingTools**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools.md)

[**ImageProcessingTools::DetectRequiredRotation**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-detectrequiredrotation.md)
