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

# EqualizeBrightness Method of the ImageDocument Object

This method equalizes the image brightness. This method is suitable for the following types of images:

* Scanned images of black-and-white documents. You can change the background color of a scanned image from gray to white and increase image contrast.
* Photos of black-and-white document. You can change the background color of a photo to white, increase image contrast, and even brightness of a photo made under poor lighting conditions or with a flash turned on.
* Photos of color documents. The method provides the same effect as for photos of black-and-white documents, but it may reduce color brightness and make gray elements too light. Use the method for photos of color documents carefully.

<Warning>
  This method can be used for gray and color images only.
</Warning>

## Syntax

### C++

```cpp theme={null}
HRESULT EqualizeBrightness( VARIANT_BOOL HasWhiteBackground);
```

### C\#

```csharp theme={null}
void EqualizeBrightness( bool HasWhiteBackground );
```

### Visual Basic .NET

```vb theme={null}
Sub EqualizeBrightness(HasWhiteBackground As Boolean)
```

## Parameters

**HasWhiteBackground**

\[in] Specifies whether the image has white background. If the value of this property is TRUE, FineReader Engine presumes that the background of the image is white and tries to even brightness of the image so that the background becomes really white.

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

[ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument)
