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

# CoordinatesConverter Object (ICoordinatesConverter Interface)

This object contains information about the pixel coordinates on the image at the moment when it was obtained from the [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument) object (the [CoordinatesConverter](/fine-reader/engine/api-reference/image-related-objects/imagedocument#coordinatesconverter) property). It allows you to convert the pixel coordinates from one image modification state to another.

You can use this object to convert the pixel coordinates between any two stages in the image processing. For example:

1. Obtain this object directly after image opening, during which image skew was corrected.
2. Apply a number of other modifications and obtain another instance of this object from the ImageDocument.
3. Now you can convert pixel coordinates between the initially deskewed image plane and the modified image plane by twice applying the ConvertCoordinates method:
   * convert from the deskewed image plane to the original using the first instance of the CoordinatesConverter;
   * convert the result from the original image plane to the modified image plane using the second instance of the CoordinatesConverter.

The CoordinatesConverter object is a persistent object. This means that the object's current state can be written to persistent storage. Later, the object can be re-created by reading the object's state from the persistent storage. The following methods provide persistence of the object:

Linux: [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), and [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)

Windows: [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method), [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method), [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method), and [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method).

## Properties

| Name        | Type                                                                                                                                                                                                          | Description                |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| Application | [Engine](/fine-reader/engine/api-reference/engine-object-iengine-interface), [read-only](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties#readonly_properties) | Returns the Engine object. |

## Methods

| Name                                                                                                                         | Description                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ConvertCoordinates](/fine-reader/engine/api-reference/image-related-objects/coordinatesconverter/convertcoordinates-method) | Converts coordinates of a pixel between different modification states or image planes of the [ImageDocument](/fine-reader/engine/api-reference/image-related-objects/imagedocument). |
| [LoadFromFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfromfile-method)                      | Restores the object's contents from a file on disk.                                                                                                                                  |
| [LoadFromMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/loadfrommemory-method)                  | Restores the object's contents from the global memory. <Note> *Windows only.*</Note>                                                                                                 |
| [SaveToFile](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetofile-method)                          | Saves the object's contents into a file on disk.                                                                                                                                     |
| [SaveToMemory](/fine-reader/engine/api-reference/supplementary-objects-and-methods/savetomemory-method)                      | Saves the object's contents into the global memory. <Note> *Windows only.*</Note>                                                                                                    |

## Related objects

<img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/coordinatesconverter.gif?s=569f3a2af2749c842aa6594c093cc407" alt="CoordinatesConverter" width="141" height="57" data-path="images/fine-reader/engine/coordinatesconverter.gif" />[](/fine-reader/engine/api-reference/image-related-objects/imagedocument#coordinatesconverter)[](/fine-reader/engine/api-reference/image-related-objects/imagedocument)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Samples

Here is a Windows sample where this object is used to convert coordinates between two different modification states:

### C\#

```csharp theme={null}
FREngine.IEngine engine;
FREngine.IFRDocument frDoc;
// Skew correction is performed by default while adding the images to the document
frDoc.AddImageFile ("D:\\Sample.tif", null, null);
// Open ImageDocument of the first page
FREngine.IImageDocument imageDoc = frDoc.Pages[0].ImageDocument; 
// Create a snapshot of coordinates after opening
FREngine.ICoordinatesConverter convAfterOpening = imageDoc.CoordinatesConverter;
// Transform the image some more
imageDoc.Transform(FREngine.RotationTypeEnum.RT_Counterclockwise, false, false);
// Create a snapshot of coordinates after transformation
FREngine.ICoordinatesConverter convAfterModification = imageDoc.CoordinatesConverter;
...
// After some processing you find a pixel on the modified image plane whose coordinates you need to convert
int x, y;
convAfterModification.ConvertCoordinates(FREngine.ImageTypeEnum.IT_Base, FREngine.ImageTypeEnum.IT_Modified, ref x, ref y);
convAfterOpening.ConvertCoordinates(FREngine.ImageTypeEnum.IT_Modified, FREngine.ImageTypeEnum.IT_Base, ref x, ref y);
// now x, y contain the coordinates of the necessary point on the deskewed image plane
```

This object is also used in the [Business Card Recognition](/fine-reader/engine/guided-tour/samples#bcr_mac) code sample for macOS.

## See also

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

[Working with Images](/fine-reader/engine/guided-tour/advanced-techniques/working-with-images)

[Working with Properties](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)
