10350 Santa Monica Blvd. Suite 285, Los Angeles, CA 90025
Phone: 310-691-8920, 310-788-9840, Fax: 419-735 -2419
1.1.44.
ReformatImage
Format
ReformatImage ( _
SourceImage
As String, _
toColor
As Integer, _
toDpi
As Integer, _
DestImage
As String _
)
Parameters
SourceImage
[in]
rotation is performed on the internal image.
toColor
[in]
– One of five values:
LICENSE_INVALID – Library was not initialized with proper license.
IMAGE_SAME_COLOR – no modification in the image color scheme
IMAGE_BW – Convert to black and white color scheme.
IMAGE_GRAY_256 – convert to 256 gray scale color scheme.
IMAGE_COLOR_256 – convert to 256-color scheme.
IMAGE_COLOR_TRUE – convert to true color scheme.
toDpi
[in]
– Set the new Image DPI. A value of 0 indicate no DPI modification.
DestImage
[in]
– Full path name of the destination file. Is this value is an empty string no save will
be performed.
Return
If function succeeds, the return the value IMG_ERR_SUCCESS.
If the function fails it returns one of the following values:
IMG_ERR_BAD_COLOR – Bad
IMG_ERR_BAD_DPI – Bad
IMG_ERR_FILE_OPEN – Cannot open input file. T his value is returned if the
string is not empty but it points to a missing or invalid source image file.
INVALID_INTERNAL_IMAGE – This value is returned if the
no document was scanned so there is no internal image in the memory.
IMG_ERR_FILE_SAVE_TO_FILE – Cannot save destination file.
IMG_ERR_FILE_SAVE_TO_FILE – Cannot save destination file due to invalid destination file or
disk save error.
Remarks
Use this function to modify the image color scheme and resolution and save it to a file in any one of
seven formats. The manipulated image may be loaded from an external file (if
holds a string value equal to the source image file name) or performed on the internal image buffer (if
SourceImage
string is empty). When using a file as the image source, it is important to use the
proper file extension to indicate the image format. Proper extension types are: BMP, JPG, TIFF, PCX,
PNG, TGA and PSD. If an image has unrecognizable extension due to an error (e.g. TIFF instead of
TIF) the function refers to the file as BITMAP.
Card Scanning Solutions
– Full path name of the original image file. If this string is empty the
toColor
parameter value.
toDpi
parameter value.
SourceImage
SourceImage
string is empty but
SourceImage
string
38
Need help?
Do you have a question about the ScanShell 2000 and is the answer not in the manual?
Questions and answers