> ## 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.

# DetectRequiredRotation Method of the ImageProcessingTools Object

This method detects the rotation that should be applied to an image to return it to the normal (upright) orientation. To apply the rotation, use the [**RotateImageByRotationType**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-rotateimagebyrotationtype.md) method.

## Syntax

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

```cpp C++ theme={null}
HRESULT DetectRequiredRotation(
  IImage*           Image,
  ILanguage*        Language,
  RotationTypeEnum* Result
);
```

## Parameters

**Image**

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

**Language**

\[in] Refers to the [**Language**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/language.md) object which specifies the language of the text on the image.

**Result**

\[out, retval] Returns a [**RotationTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rotationtypeenum.md) constant which specifies the rotation that should be applied to the image to return it to the normal orientation.

## 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::DetectOrientationByText**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageprocessingtools-detectorientationbytext.md)
