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.
HRESULT SaveImageRegionTo( BSTR FolderName, IRegion* Rects, IPrepareImageMode* PrepareMode );
void SaveImageRegionTo( string FolderName, IRegion Rects, IPrepareImageMode PrepareMode );
Visual Basic .NET
Sub SaveImageRegionTo( _ FolderName As String, _ Rects As IRegion, _ PrepareMode As IPrepareImageMode _ )
- [in] This parameter stores the full path to the folder. For example, "C:\MyPic".
- [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.
- [in] This parameter of the PrepareImageMode type specifies the parameters of image preparation during the rectangles extraction.
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.