> ## 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 オブジェクト（IImageDocument インターフェイス）

このオブジェクトは、開いている画像、つまり「画像ドキュメント」に対応します。これは、いわゆる「内部形式」の画像です。このオブジェクトの属性には、画像の属性が反映されます。**ImageDocument** オブジェクトは、[**Image**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/image.md) オブジェクト (「画像プレーン」) のコレクションのルートです。各画像ドキュメントには、次の 3 つの画像プレーンが含まれます。

* *Black-and-white* 画像プレーン。元の画像の白黒コピーです。このコピーに傾き補正が適用されるかどうかは、[**ImageLoadingParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageloadingparams.md) オブジェクトの **CorrectSkewXXX** Properties の値によって決まります。
* *カラー* 画像プレーン。元の画像のカラーまたはグレーのコピーです。このコピーに傾き補正が適用されるかどうかは、[**ImageLoadingParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageloadingparams.md) オブジェクトの **CorrectSkewXXX** Properties の値によって決まります。元の画像が白黒の場合、このページは「black-and-white」画像プレーンと同じになります。
* *プレビュー*。ユーザーインターフェースにプレビューを表示するための小さなグレー画像です。

上記の各画像プレーンは、それぞれ固有のサイズと解像度を持ちます。なお、白黒画像とカラー画像のサイズと解像度は同じです。画像ドキュメントは傾き補正済みの画像で構成されるため、**ImageDocument** オブジェクトには座標変換用の関数が用意されています。ある画像ページから別の画像ページへピクセル座標を変換するには、[**ConvertCoordinates**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-convertcoordinates.md) 関数を使用します。認識関数では傾き補正済みのページが使用される点に注意してください。

## Properties

| **名前** | **型** | **説明** |
| - | - | - |
| **BlackWhiteImage** | [**Image**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/image.md)、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | 現在の **ImageDocument** オブジェクトの black-and-white 画像プレーンへのアクセスを提供します。 |
| **ColorImage** | [**Image**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/image.md)、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | 現在の **ImageDocument** オブジェクトのカラー画像プレーンにアクセスできます。 |
| **ImageColorType** | [**ImageColorTypeEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagecolortypeenum.md)、読み取り専用 | **ImageDocument** の各画像プレーンは、それぞれ独自のカラーモードを持ちます。このプロパティは、各画像プレーン (black-and-white、グレー、カラー) のカラーモードのうち最大の値を、**ImageDocument** 全体のカラーモードとして示します。 |
| **ImageRotation** | [**RotationTypeEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/rotationtypeenum.md)、読み取り専用 | 現在の **ImageDocument** オブジェクトに対して、開いた時点以降、または [**SaveModified**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) メソッドを最後に呼び出した時点以降に実行された回転を示します。 |
| **ImageWasInverted** | [**Boolean**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | このプロパティが TRUE の場合、画像を開いた後、または最後に [**SaveModified**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) メソッドを呼び出した後に、画像の色が白黒反転されたことを示します。 |
| **ImageWasMirrored** | [**Boolean**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | このプロパティが TRUE の場合、画像を開いた後、または [**SaveModified**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) メソッドを最後に呼び出した後に、画像が垂直軸を中心に鏡像反転されたことを示します。 |
| **IsInternalFormat** | [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 画像が ABBYY FlexiCapture SDK の内部形式かどうかを指定します。 |
| **IsModified** | [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | **ImageDocument** オブジェクトが画像ファイルから取得されてから、または [**SaveModified**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) メソッドが最後に呼び出されてから、このオブジェクトに何らかの変更が加えられたかどうかを示します。変更内容は、**ImageWasInverted、ImageWasMirrored** および [**IPage::ImageRotation**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/page.md#imagerotation) プロパティで確認できます。 |
| **IsReadOnly** | [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | **ImageDocument** オブジェクトが表している画像ファイルの現在の状態が読み取り専用かどうかを示します。読み取り専用の場合、このオブジェクトに対して変更系のメソッドを呼び出すとエラーコードが返されます。 |
| **IsSkewCorrected** | [**ブール型**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 画像の傾きが完全に補正されたかどうかを示します。画像に傾き補正がまったく必要ない場合 ([**ImageLoadingParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageloadingparams.md) オブジェクトの **CorrectSkewXXX** プロパティがすべて FALSE に設定されている場合) 、または [**ImageLoadingParams**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imageloadingparams.md) オブジェクトの **CorrectSkewXXX** プロパティの設定に従って、前処理の過程で傾きが完全に補正された場合、このプロパティは TRUE になります。このプロパティの値が FALSE の場合は、画像の傾き補正に失敗したことを示します。 |
| **PreviewImage** | [**Image**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/image.md)、[読み取り専用](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md#readonly-properties) | 現在の **ImageDocument** オブジェクトのプレビュー画像プレーンへのアクセスを提供します。開いている画像のすべてにこの画像プレーンが含まれているとは限らないため、このプロパティでアクセスするオブジェクトは NULL になる場合があります。 |
| **SkewAngle** | [**Double**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 画像を開く際に検出・補正された傾き角の正接を格納します。傾き角が負の場合、画像は時計回りに回転し、正の場合は反時計回りに回転します。画像は任意の点を中心に回転できます。傾き補正済みの画像のサイズは、常に元の画像のサイズよりも大きくなります。 |
| **SourceImageFileFormat** | [**ImageFileFormatEnum**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagefileformatenum.md)、読み取り専用 | 現在の **ImageDocument** オブジェクトの元の画像ファイルの形式に関する情報を提供します。この情報を取得できない場合、または画像がスキャナから取得された場合、このプロパティの値は IFF\_UnknownFormat になります。 **注:** 元の画像ファイルの形式に関する情報は、ABBYY FlexiCapture SDK には保存されません。 |
| **SourceImageScannerInfo** | [**String**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 画像の取得に使用されたスキャナに関する情報を提供します。元の画像のパラメーター情報が取得できない場合、または画像がファイルから取得された場合、このプロパティの値は空文字列になります。 |
| **SourceImageScanThreshold** | [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 現在の **ImageDocument** オブジェクトのスキャン強度のしきい値に関する情報を提供します。元の画像のパラメーターに関する情報を取得できない場合、または画像がファイルから取得された場合、このプロパティの値は -1 になります。 |
| **SourceImageXResolution** | [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 現在の **ImageDocument** オブジェクトの元の画像の水平解像度を示します。元の画像のパラメーターに関する情報を取得できない場合、このプロパティの値は 0 になります。 |
| **SourceImageYResolution** | [**Integer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/propertiestypes.md)、読み取り専用 | 現在の **ImageDocument** オブジェクトの元の画像の垂直解像度に関する情報を提供します。元の画像のパラメーターに関する情報を取得できない場合、このプロパティの値は 0 になります。 |

## メソッド

| **名前** | **説明** |
| - | - |
| [**ChangeResolution**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-changeresolution.md) | 画像の解像度を変更します。 |
| [**Close**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-close.md) | オブジェクトを解放します。 |
| [**ConvertCoordinates**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-convertcoordinates.md) | **ImageDocument** オブジェクトの画像プレーン間でピクセルの座標を変換します。 |
| [**SaveModified**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savemodified.md) | 現在の **ImageDocument** オブジェクトに対して行われたすべての変更を、ディスク上のフォルダーに保存します。 |
| [**SaveTo**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-saveto.md) | **ImageDocument** オブジェクトの内容をディスク上のフォルダーに保存します。画像は ABBYY FlexiCapture SDK の内部形式で保存されます。 |
| [**SaveToFile**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savetofile.md) | **ImageDocument** オブジェクトの内容をファイルに保存します。ファイルは、外部プログラムでは表示できない形式で保存されます。 |
| [**SaveToMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/imagedocument-savetomemory.md) | **ImageDocument** オブジェクトの内容をグローバルメモリに保存します。 |

## 出力パラメーター

このオブジェクトは、[**Engine**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine.md) オブジェクトの [**LoadImageDocFromFile**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-loadimagedocfromfile.md)、[**LoadImageDocFromMemory**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-loadimagedocfrommemory.md)、[**LoadImageDocument**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/engine-loadimagedocument.md) の各メソッドの出力パラメーターです。

## 関連項目

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

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

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

[Properties の操作](https://docs.abbyy.com/ja/flexi-capture/sdk/guided-tour/properties.md)
