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

# DetectResolution Method of the FRPage Object

This method selects the best resolution from the specified range. It is intended to estimate the best resolution for recognition. The result of this method’s work can be unreliable if the image contains little or no text.

The method does not change resolution of the page image. To change resolution to the selected one, use the [IImageDocument::ChangeResolution](/fine-reader/engine/api-reference/image-related-objects/imagedocument/changeresolution-method) method.

## Syntax

### C++

```cpp theme={null}
HRESULT DetectResolution(
  IObjectsExtractionParams* ExtractionParams,
  int                       MinResolution,
  int                       MaxResolution,
  int*                      NewResolution
);
```

### C\#

```csharp theme={null}
void DetectResolution(
  IObjectsExtractionParams ExtractionParams,
  int                      MinResolution,
  int                      MaxResolution,
  out int                  NewResolution
);
```

### Visual Basic .NET

```vb theme={null}
Sub DetectResolution( _
  ExtractionParams As IObjectsExtractionParams, _
  MinResolution As Integer, _
  MaxResolution As Integer, _
  ByRef NewResolution As Integer
)
```

## Parameters

ExtractionParams

\[in] Refers to the [ObjectsExtractionParams](/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/objectsextractionparams) object that stores parameters of objects extraction. This parameter may be 0. In this case, the objects are extracted with default parameters, or, if a [profile](/fine-reader/engine/guided-tour/advanced-techniques/working-with-profiles) has been loaded, the parameters set by this profile are used.

MinResolution

\[in] Specifies the minimum resolution which can be selected.

MaxResolution

\[in] Specifies the maximum resolution which can be selected.

NewResolution

\[out] Receives the best resolution of the page image. If ABBYY FineReader Engine cannot select resolution from the specified range (MinResolution to MaxResolution), -1 is returned.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](/fine-reader/engine/api-reference/return-codes).

## See also

[FRPage](/fine-reader/engine/api-reference/document-related-objects/frpage)

[IPagePreprocessingParams::OverwriteResolutionMode](/fine-reader/engine/api-reference/parameter-objects/preprocessing-analysis-recognition-and-synthesis-parameters/pagepreprocessingparams#overwriteresolutionmode)

[IImageDocument::ChangeResolution](/fine-reader/engine/api-reference/image-related-objects/imagedocument/changeresolution-method)

[Working with Profiles](/fine-reader/engine/guided-tour/advanced-techniques/working-with-profiles)
