new BaseImage()
Image implementation.
Members
barcodes
Barcodes found on the image.
localFileChunks :Array.<string>
Array of Encrypted local file identifiers of the image chunks, if the image split was requested using deliverables.localFile.split
or deliverables.originalImageFile.split
for corresponding image object.
localFile
will be set only if whole data is fit within single chunk.
discard :boolean
This property is initialized to false. If set to true by the onImageAcquired
handler,
the image is discarded (deleted from the control's memory) when the handler returns.
Note, that this property is processed synchronously in onImageAcquired
handler, i.e. if set in asynchronous operation callback, the change won't be reflected.
dpi :Array.<number>
The resolution of the image, in DPI (Dots Per Inch), in an array of [horizontal dpi, vertical dpi ].
eDoc :boolean
Flag indicating whether or not image is PDF or other eDoc.
front :boolean
If present, true when the image came from the front (top) side of a physical sheet, false for the back/bottom side.
If omitted, this information could not be confidently determined e.g. the scan is from a device that does not feed sheets.
height :number
Height of the image in pixels.
imprintedText :string
Imprinted text.
localFile :string
Encrypted local file identifier.
bitsPerPixel :number
Number of bits used to represent a pixel (typically 1,8, or 24).
newSheet :boolean
If present, this is true when this image came from a different physical sheet than the preceding image if any.
It is false if this image is the flip (back, bottom) side of the same sheet as the preceding image.
If omitted, it means this information could not be confidently determined.
originalImage :ImageBase
Original image object metadata and local data storage identifiers.
Original image is stored to the local storage and removed from memory right after scan. Only image metadata(like width, height, pixelType, etc) and ImageBase#localFileChunks
, ImageBase#localFile
properties are valid.
patchCode :string
'0', '1', '2', '3', '4', '6', or 'T'. The '0' value means 'no patch code detected'.
Note that the values are 1-character strings, but of course this is JavaScript so you can write either image.patchCode == '2' or image.patchCode == 2, as you wish.
When patch code detection is not enabled, the patchCode of each acquired image is '0'.
Atalasoft.Controls.Capture.WebScanning.scanningOptions = { onImageAcquired: _onImageAcquired, patchCodes: true }
// ...
function _onImageAcquired(eventName, image) {
// Check patch code:
if (image.patchCode == 'T') {
// 'T' patch-code detected
}
}
path :string
File path of the imported file.
pixelType :Atalasoft.Controls.Capture.PixelType
Pixel type of the image.
sheetNo :number
If present, the index of the physical sheet within the scan job of which this is an image (front or back side).
The first sheet scanned is index 0.
If not present, this information could not be confidently determined e.g. the scan is from a device that does not feed sheets.
width :number
Width of the image in pixels.
xdpi :number
X DPI the image.
ydpi :number
Y DPI the image.
filename :string
File path of the imported PDF file.
This property having value indicates that image proxy represents file format that is imported "As Is", i.e. PDF or eDoc. In this case image-specific properties are not present on such object and format change is not supported for it when requesting image data.
ImprintedText
- Deprecated:
- Use
imprintedText
instead.
- Use
Filename
PixelType
- Deprecated:
- Use
pixelType
instead.
- Use
SheetNo
- Deprecated:
- Use
sheetNo
instead.
- Use
Barcodes
- Deprecated:
- Use
barcodes
instead.
- Use
Height
- Deprecated:
- Use
height
instead.
- Use
Width
- Deprecated:
- Use
width
instead.
- Use
BitsPerPixel
- Deprecated:
- Use
bitsPerPixel
instead.
- Use
XResolution
- Deprecated:
- Use
xdpi
instead.
- Use
PatchCode
- Deprecated:
- Use
patchCode
instead.
- Use
YResolution
- Deprecated:
- Use
ydpi
instead.
- Use
Methods
asBase64String(format, optionsopt, callbackopt) → {string|undefined}
Gets an image as base64 string in the specified format.
Parameters:
Name | Type | Description |
---|---|---|
format |
string | Image encoding format. see |
[options] |
DeliverablesConfig | encoding options. |
[callback] |
imageDataCallback | Completion callback function. If not passed, method is executed synchronously. |
Returns:
base64 image data if executed synchronously; undefined
otherwise
- Type
- string | undefined
clear()
Resets the image object to an empty state, releasing any (possibly large) internal memory being used to store pixel data. This is as close to a 'destroy' or 'dispose' method as we can get with a javascript object.
saveEncryptedLocal(formatopt, optionsopt, callbackopt) → {string|undefined}
Saves an image as encrypted local file.
Parameters:
Name | Type | Description |
---|---|---|
[format] |
string | File format to save image. |
[options] |
DeliverablesConfig | Additional file options. |
[callback] |
saveLocalFileCallback | Completion callback function. If not passed, method is executed synchronously. |
Returns:
created local file identifier if executed synchronously; "undefined" otherwise.
- Type
- string | undefined
AsBase64String()
- Deprecated:
- Use
asBase64String
instead.
- Use
SaveEncryptedLocalFile()
- Deprecated:
- Use
saveEncryptedLocal
instead.
- Use