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

# StretchImage Method of the ImageProcessingTools Object

This method stretches or shrinks the image to the specified size.

## Syntax

```vb Visual Basic .NET theme={null}
Function StretchImage( _
  Image As Image, _
  Width As Integer, _
  Height As Integer, _
  NewResolution As Integer _
) As Image
```

```cpp C++ theme={null}
HRESULT StretchImage(
  IImage*  Image,
  int      Width,
  int      Height,
  int      NewResolution,
  IImage** Result
);
```

## Parameters

**Image**

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

**Width**

\[in] Specifies the width of the resulting image.

**Height**

\[in] Specifies the height of the resulting image.

**NewResolution**

\[in] Specifies the resolution of the resulting image.

**Result**

\[out, retval] A pointer to the [**IImage**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md)**\*** pointer variable that provides access to the resulting image.

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