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 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 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 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 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, read-only Provides access to the black-and-white image plane of the current ImageDocument object.
ColorImage Image, read-only Provides access to the color image plane of the current ImageDocument object.
ImageColorType ImageColorTypeEnum, 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, read-only Specifies rotation that was performed upon the current ImageDocument object from the opening or from the last call to the SaveModified method.
ImageWasInverted Boolean, read-only This property set to TRUE specifies that the image colors were inverted after opening or after the last call to SaveModified method.
ImageWasMirrored Boolean, 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 method.
IsInternalFormat Boolean, read-only Specifies if image is in ABBYY FlexiCapture SDK internal format.
IsModified Boolean, 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 method. Information about modifications is available through the ImageWasInverted, ImageWasMirrored and IPage::ImageRotation properties.
IsReadOnly Boolean, 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, 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 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 object. If the value of this property is FALSE, an attempt to correct the skew of the image failed.
PreviewImage Image, read-only 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, 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, 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, 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, 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, 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, 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 Changes resolution of the image.
Close Releases the object.
ConvertCoordinates Converts coordinates of a pixel between image planes of the ImageDocument object.
SaveModified Saves all modifications that were performed upon the current ImageDocument object into the folder on disk.
SaveTo Saves the contents of the ImageDocument object into a folder on disk. The image is saved in ABBYY FlexiCapture SDK internal format.
SaveToFile 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 Saves the contents of the ImageDocument object into the global memory.

Output parameter

This object is the output parameter of the LoadImageDocFromFile, LoadImageDocFromMemory, LoadImageDocument methods of the Engine object.

See also

Image

Page

PageDefinition

Working with Properties

8/15/2023 1:19:30 PM

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.