Nicomsoft OCR: Developer's Guide


Img_SaveToFile


Syntax

C++:int Img_SaveToFile(HIMG ImgObj, UNICODECHAR* FileName, int Format, int Flags)
C#:int Img_SaveToFile(int ImgObj, string FileName, int Format, int Flags)
Visual Basic:Function Img_SaveToFile(ByVal ImgObj As Integer, ByVal FileName As String, ByVal Format As Integer, ByVal Flags As Integer) As Integer
Java:int Img_SaveToFile(HIMG ImgObj, String FileName, int Format, int Flags)
Delphi:function Img_SaveToFile(ImgObj:HIMG; FileName:PWCHAR; Format:integer; Flags:integer):integer


Description

Saves the current image assigned to the Image or Block object to a file. The free, open-source FreeImage library is used to support a wide range of image formats. Please refer to its documentation for a full list of supported image formats.


Parameters

ImgObj [IN] – the Image object. You can also specify the Block object to save only a part of the image.
FileName [IN] – a Unicode, null-terminated string that contains the full path and filename of the image file that will be created.
Format [IN] – the destination image file format. See the IMG_FORMAT_XXXXX constants for possible values.
Flags [IN] – for the default options, specify 0; for the JPEG format, you can also specify the quality level (1 ... 100).


Return value

Zero if success, otherwise an error code.


Remarks

None.


Example

None.