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

# ImageDocument Object (IImageDocument Interface)

This object corresponds to an open image, or “image document” – an image in the so-called “internal format”. Its attributes reflect the attributes of an image. **ImageDocument** object is a root for a collection of the [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md) objects, or “image planes”. Each image document includes 3 image planes:

* *Black-and-white* plane. It is the black-and-white copy of the source image. The copy is deskewed or non-deskewed depending on the values of the **CorrectSkewXXX** properties of the [**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object.
* *Color* plane. It is the color or gray copy of the source image. The copy is deskewed or non-deskewed depending on the values of the **CorrectSkewXXX** properties of the [**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object. If a source image was black-and-white, this page is the same as the "black-and-white" plane.
* *Preview*. A small gray image used for displaying the preview in user interface.

Each image plane of the above-mentioned set is characterized by its own size and resolution. The size and resolution of black-and-white and color images are the same. Since image documents consist of deskewed images, the **ImageDocument** object has a set of coordinate conversion functions. Use the [**ConvertCoordinates**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-convertcoordinates.md) function to convert pixel coordinates from one image page to another. Remember that the recognition functions use the deskewed page.

## Properties

| **Name** | **Type** | **Description** |
| - | - | - |
| **BlackWhiteImage** | [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Provides access to the black-and-white image plane of the current **ImageDocument** object. |
| **ColorImage** | [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Provides access to the color image plane of the current **ImageDocument** object. |
| **ImageColorType** | [**ImageColorTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagecolortypeenum.md), read-only | Each color plane of the **ImageDocument** is characterized by its own color type. This property specifies the color type for the whole **ImageDocument** as the maximum of the corresponding values for its color planes (black-and-white, gray, color). |
| **ImageRotation** | [**RotationTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/rotationtypeenum.md), read-only | Specifies rotation that was performed upon the current **ImageDocument** object from the opening or from the last call to the [**SaveModified**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) method. |
| **ImageWasInverted** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | This property set to TRUE specifies that the image colors were inverted after opening or after the last call to [**SaveModified**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) method. |
| **ImageWasMirrored** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | This property set to TRUE specifies that the image was mirrored around the vertical axis after opening or after the last call to [**SaveModified**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) method. |
| **IsInternalFormat** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Specifies if image is in ABBYY FlexiCapture SDK internal format. |
| **IsModified** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Specifies if any modifications were made upon the **ImageDocument** object since it was obtained from the image file or from the last call of the [**SaveModified**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) method. Information about modifications is available through the **ImageWasInverted, ImageWasMirrored** and [**IPage::ImageRotation**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/page.md#imagerotation) properties. |
| **IsReadOnly** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Specifies if the current representation of image file by the **ImageDocument** object is read-only. If it is read-only, modification methods upon it will lead to error code returned. |
| **IsSkewCorrected** | [**Boolean**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Specifies whether the skew of the image was fully corrected. This property is TRUE if the image does not need any skew correction (all the **CorrectSkewXXX** properties of the [**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object are set to FALSE) or if the skew was fully corrected during the preparation process as defined by the **CorrectSkewXXX** properties of the [**ImageLoadingParams**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imageloadingparams.md) object. If the value of this property is FALSE, an attempt to correct the skew of the image failed. |
| **PreviewImage** | [**Image**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/image.md), [read-only](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | Provides access to the preview image plane of the current **ImageDocument** object. Not all open images contain this image plane, therefore the object accessed through this property may be NULL. |
| **SkewAngle** | [**Double**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Stores the tangent of skew angle that was detected for the image and corrected during opening. If the skew angle is negative the image is rotated clockwise; if the angle is positive the image is rotated counter-clockwise. The image can be rotated around any point. The size of the deskewed image is always larger than the size of the original image. |
| **SourceImageFileFormat** | [**ImageFileFormatEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagefileformatenum.md), read-only | Provides information about format of the source image file of the current **ImageDocument** object. If this information is not available or image was received from scanner, the value of this property is IFF\_UnknownFormat. **Note:** Information about format of the source image file is not saved in ABBYY FlexiCapture SDK. |
| **SourceImageScannerInfo** | [**String**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Provides information about scanner used to acquire the image. If information about source image parameters is not available or image was received from file, the value of this property is empty string. |
| **SourceImageScanThreshold** | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Provides information about scanning intensity threshold for the current **ImageDocument** object. If information about source image parameters is not available or image was obtained from file, the value of this property is -1. |
| **SourceImageXResolution** | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Provides information about horizontal resolution of the source image of the current **ImageDocument** object. If information about source image parameters is not available, the value of this property is 0. |
| **SourceImageYResolution** | [**Integer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/propertiestypes.md), read-only | Provides information about vertical resolution of the source image of the current **ImageDocument** object. If information about source image parameters is not available, the value of this property is 0. |

## Methods

| **Name** | **Description** |
| - | - |
| [**ChangeResolution**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-changeresolution.md) | Changes resolution of the image. |
| [**Close**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-close.md) | Releases the object. |
| [**ConvertCoordinates**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-convertcoordinates.md) | Converts coordinates of a pixel between image planes of the **ImageDocument** object. |
| [**SaveModified**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) | Saves all modifications that were performed upon the current **ImageDocument** object into the folder on disk. |
| [**SaveTo**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-saveto.md) | Saves the contents of the **ImageDocument** object into a folder on disk. The image is saved in ABBYY FlexiCapture SDK internal format. |
| [**SaveToFile**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savetofile.md) | Saves the contents of the **ImageDocument** object into a file. The file is saved in a format which cannot be viewed in any external program. |
| [**SaveToMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/imagedocument-savetomemory.md) | Saves the contents of the **ImageDocument** object into the global memory. |

## Output parameter

This object is the output parameter of the [**LoadImageDocFromFile**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-loadimagedocfromfile.md), [**LoadImageDocFromMemory**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-loadimagedocfrommemory.md), [**LoadImageDocument**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine-loadimagedocument.md) methods of the [**Engine**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/engine.md) object.

## See also

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

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

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

[Working with Properties](https://docs.abbyy.com/flexi-capture/sdk/guided-tour/properties.md)
