SaveImageRegionTo Method of the ImageDocument Object
This method saves the parts of the image restricted by the specified set of rectangles into a folder on disk. The saved image is in the ABBYY FineReader Engine internal format.
The compression of a color and gray image planes is defined by the CompressImage property of the PrepareImageMode object, while a black-and-white image plane is always saved with the CCITT4 compression. This new image has the rectangle that fully bounds the set of rectangles. Parts of image that do not lay inside these rectangles but lay inside the bounding rectangle are filled in with white color.
Syntax
HRESULT SaveImageRegionTo( BSTR FolderName, IRegion* Rects, IPrepareImageMode* PrepareMode );
Parameters
- FolderName
- [in] This parameter stores the full path to the folder. For example, "/opt/MyPic".
- Rects
- [in] This parameter of the Region type specifies the set of rectangles that are to be copied from the source image into the target one. The coordinates of rectangles are related to the deskewed black-and-white page of the ImageDocument. If an empty region is passed as the value of this parameter, an error is returned. You can check whether the region is empty using the IRegion::IsEmpty property.
- PrepareMode
- [in] This parameter of the PrepareImageMode type specifies the parameters of image preparation during the rectangles extraction.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
See also
7/3/2024 8:50:25 AM