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

# ConvertCoordinates Method of the ImageDocument Object

This method converts coordinates of a pixel defined on an image plane to coordinates defined on another image plane. Conversion between all possible pairs of image planes is permitted.

## Syntax

```vb Visual Basic .NET theme={null}
Sub ConvertCoordinates( _
  FromPage As ImageTypeEnum, _
  ToPage As ImageTypeEnum, _
  X As Integer, _
  Y As Integer _
)
```

```cpp C++ theme={null}
HRESULT ConvertCoordinates(
  ImageTypeEnum FromPage,
  ImageTypeEnum ToPage,
  int*          X,
  int*          Y
);
```

## Parameters

**FromPage**

\[in] This variable of the [**ImageTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagetypeenum.md) type specifies the image page from which the coordinates of pixel are to be converted.

**ToPage**

\[in] This variable of the [**ImageTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagetypeenum.md) type specifies the image page to which the coordinates of pixel are to be converted.

**X**

\[in, out] This variable stores the horizontal coordinate of the pixel relative to the source image page before the method call, and the horizontal coordinate of the pixel relative to the target image page after the method call.

**Y**

\[in, out] This variable stores the vertical coordinate of the pixel relative to the source image page before the method call, and the vertical coordinate of the pixel relative to the target image page after the method call.

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

## Remarks

The coordinates of pixels on the black-and-white image page and the color image page are the same.

## See also

[**ImageTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagetypeenum.md)
