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

C++

HRESULT SaveImageRegionTo(
  BSTR               FolderName,
  IRegion*           Rects,
  IPrepareImageMode* PrepareMode
);
    

C#

void SaveImageRegionTo(
  string           FolderName,
  IRegion           Rects,
  IPrepareImageMode PrepareMode
);
    

Visual Basic .NET

Sub SaveImageRegionTo( _
  FolderName As String, _
  Rects As IRegion, _
  PrepareMode As IPrepareImageMode _
)
    

Parameters

FolderName
[in] This parameter stores the full path to the folder. For example, "C:\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

ImageDocument

PrepareImageMode

17.09.2024 15:14:40

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.