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

# SaveImageRegionTo Method of the ImageDocument Object

This method saves the parts of the image restricted by the specified set of rectangles into a folder on disk. The saved image is in the ABBYY FineReader Engine internal format.

## Syntax

### C++

```cpp theme={null}
HRESULT SaveImageRegionTo(
  BSTR               FolderName,
  IRegion*           Rects
);
```

### C\#

```csharp theme={null}
void SaveImageRegionTo(
  string           FolderName,
  IRegion          Rects
);
```

### Visual Basic .NET

```vb theme={null}
Sub SaveImageRegionTo( _
  FolderName As String, _
  Rects As IRegion _
)
```

## Parameters

**FolderName**

\[in] This parameter stores the full path to the folder. For example: C:\MyPic (Win), /opt/MyPic (Linux), /Users/user/Pictures/MyPic (macOS).

**Rects**

\[in] This parameter of the [Region](/fine-reader/engine/api-reference/supplementary-objects-and-methods/region) type specifies the set of rectangles that are to be copied from the source image into the target one. The coordinates of rectangles are related to the deskewed black-and-white page of the [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument). If an empty region is passed as the value of this parameter, an error is returned. You can check whether the region is empty using the [IRegion::IsEmpty](/fine-reader/engine/api-reference/supplementary-objects-and-methods/region#isempty) property.

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