ABBYY FineReader Engine works with images by loading them into an FRDocument object, which represents the document being processed.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.
Image opening
To load images into the document, do one of the following:- Use the CreateFRDocumentFromImage method of the Engine object to create an FRDocument object.
- Add images to an existing FRDocument object from a file. Use the AddImageFile, AddImageFileFromMemory, AddImageFileFromStream, AddImageFileWithPassword, or AddImageFileWithPasswordCallback method.
ImageDocument structure
Once loaded into the document, the image of each page can be accessed via the IFRPage::ImageDocument property. Each open image in ABBYY FineReader Engine is represented by an ImageDocument object. The ImageDocument stores the image in the so-called “internal format,” which includes 4 image planes, represented by Image objects:- Black-and-white plane. It is the black-and-white copy of the source image.
- Gray plane. This is the gray copy of the source image. If the source image was black-and-white, this page is the same as the black-and-white plane.
- Color plane. This is the color copy of the source image. If the source image was black-and-white, this page is the same as the black-and-white plane; if it was gray, this page is the same as the gray plane.
- Preview. A small color image used for displaying a preview image in the user interface. The preview is created at the call to the GetPreviewImage or GetPreviewImageSpecificSize method. Any modification of the image, automatic or manual, may reset the created preview, and it will have to be created again.
- Get this object using the IImageDocument::CoordinatesConverter property directly after image opening, during which image skew was corrected.
- After other modifications, obtain another instance of this object from the ImageDocument.
- Now you can convert pixel coordinates between the initially deskewed image plane and the modified image plane by applying the ConvertCoordinates method twice:
- 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.
Image modification
Modifications during image opening are managed by the PrepareImageMode object. After opening, the image can be modified using:- Methods of the ImageDocument object
- The ImageModification object, passed to the IImageDocument::Modify method
- Methods of the FRPage and FRDocument objects
Image saving
You can save the current image plane into an image file in a specified format using the WriteToFile method of the Image object. ABBYY FineReader Engine also provides functionality for saving several images into a single image file. To save a multi-page image file, use the MultipageImageWriter object:- Create a MultipageImageWriter object using the CreateMultipageImageWriter method of the Engine object.
- Add images to the end of the multi-page image file using the AddPage method of the MultipageImageWriter object. Each image is added as a single page.
- Before the newly created image file can be used, all the references to the MultipageImageWriter object must be released.
