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

# ClearReplaceBlackPixelsRegions Method of the ImageModification Object

This method clears the internal array of "replace black pixels" regions. By default, the internal array of these regions is empty, and this method may be called to remove all the "replace black pixels" regions that were added previously. To add a new region to this internal array call the [IImageModification::AddReplaceBlackPixelsRegion](/fine-reader/engine/api-reference/image-related-objects/imagemodification/addreplaceblackpixelsregion-method) method.

## Syntax

### C++

```cpp theme={null}
HRESULT ClearReplaceBlackPixelsRegions();
```

### C\#

```csharp theme={null}
void ClearReplaceBlackPixelsRegions();
```

### Visual Basic .NET

```vb theme={null}
Sub ClearReplaceBlackPixelsRegions()
```

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

## Remarks

Black pixels on the image inside the "replace black pixels" regions will be replaced with the pixels of the specified color when [IImageDocument::Modify](/fine-reader/engine/api-reference/image-related-objects/imagedocument/modify-method) method is applied. This operation is performed on the [black-and-white](/fine-reader/engine/guided-tour/advanced-techniques/working-with-images#black-and-white) image plane but results will be applied to the [gray](/fine-reader/engine/guided-tour/advanced-techniques/working-with-images#gray) and [color](/fine-reader/engine/guided-tour/advanced-techniques/working-with-images#color) image planes too.

## See also

[ImageModification](/fine-reader/engine/api-reference/image-related-objects/imagemodification)

[AddReplaceBlackPixelsRegion](/fine-reader/engine/api-reference/image-related-objects/imagemodification/addreplaceblackpixelsregion-method)
