Runtime Information

Methods
GetImageBitDepth() GetImageHeight() GetImageSize()
GetImageSizeWithSpecifiedType() GetImageWidth() GetImageXResolution()
GetImageYResolution() GetSelectedImageIndex() GetSelectedImagesSize()
GetSkewAngle() GetSkewAngleEx() IsBlankImageExpress()
Properties
BlankImageCurrentStdDev BlankImageMaxStdDev BlankImageThreshold
CurrentImageIndexInBuffer HowManyImagesInBuffer ImageLayoutDocumentNumber
ImageLayoutFrameBottom ImageLayoutFrameLeft ImageLayoutFrameNumber
ImageLayoutFrameRight ImageLayoutFrameTop ImageLayoutPageNumber
ImagePixelType MagData MagType
SelectedImagesCount

Methods

GetImageBitDepth()
Returns the pixel bit depth of the selected image.
Syntax .GetImageBitDepth(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
If Dynamic Web TWAIN fails to get the pixel bit depth of the image, -1 is returned.
Availability v6.2+
GetImageHeight()
Returns the height (in pixels) of the selected image.
Syntax .GetImageHeight(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
If Dynamic Web TWAIN fails to get the height of the image, -1 is returned.
Availability v6.2+
GetImageSize()
Calculates the file size of a new image resized from an image of a specified index in buffer.
Syntax .GetImageSize(sImageIndex, iWidth, iHeight);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
number iWidth: the width for the new image.
number iHeight: the height for the new image.
Return value number: returns the size in bytes.
If Dynamic Web TWAIN fails to get the size of the image, -1 is returned.
Availability All versions.
GetImageSizeWithSpecifiedType()
Calculates the file size of a specified image based on its format.
Syntax .GetImageSizeWithSpecifiedType(sImageIndex, sImageType);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
EnumDWT_ImageType sImageType: the image format to be used.
Return value number: returns the size in bytes.
If Dynamic Web TWAIN fails to calculate the size, -1 is returned.
Availability All versions.
GetImageWidth()
Returns the width (in pixels) of the selected image.
Syntax .GetImageWidth(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
If Dynamic Web TWAIN fails to get the width of the image, -1 is returned.
Availability v6.2+
GetImageXResolution()
Returns the horizontal resolution of the specified image.
Syntax .GetImageXResolution(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
If Dynamic Web TWAIN fails to get the resolution of the image, -1 is returned.
Availability v8.0+
GetImageYResolution()
Returns the vertical resolution of the specified image.
Syntax .GetImageYResolution(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
Availability v8.0+
Usage notes If Dynamic Web TWAIN fails to get the resolution of the image, -1 is returned.
GetSelectedImageIndex()
Returns the index of a selected image in the index array of selected images.
Syntax .GetSelectedImageIndex(selectedIndex);
Parameters number selectedIndex: the index of the array which holds all the indices of selected images.
Return value number
Availability v7.0+
Usage notes If three images are selected in a 10 image buffer (indexes 0,5,9) GetSelectedImageIndex(1) = 5; as it is the second image selected.
GetSelectedImagesSize()
Calculates the file size in the specified format for the selected images.
Syntax .GetSelectedImagesSize(imageType);
Parameters EnumDWT_ImageType sImageType: the image format.
Return value number
If Dynamic Web TWAIN fails to calculate the size, -1 is returned.
Availability v6.0+
Usage notes If the sImageType is IT_TIF or IT_PDF, GetSelectedImagesSize() returns the total size of the selected images. Otherwise, the method returns the size of the first selected image.
GetSkewAngle()
Returns the skew angle of an image specified by index.
Syntax .GetSkewAngle(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value number
Availability v9.0+
Usage notes This method can be combined with a rotation API to correct a skewed document.
GetSkewAngleEx()
Returns the skew angle of a rectangular portion of an image specified by index.
Syntax .GetSkewAngleEx(sImageIndex, left, top, right, bottom);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
number left: the x-coordinate of the upper-left corner of the rectangle.
number top: the y-coordinate of the upper-left corner of the rectangle.
number right: the x-coordinate of the lower-right corner of the rectangle.
number bottom: the y-coordinate of the lower-right corner of the rectangle.
Return value number
Availability v9.0+
IsBlankImageExpress()
Detects whether the image of a specified index is blank.
Syntax .IsBlankImageExpress(sImageIndex);
Parameters number sImageIndex: the index of the image in the buffer. The index is 0-based.
Return value boolean: 'true' means the image is blank.
Availability v10.0+

Properties

BlankImageCurrentStdDev
Returns the deviation of the pixels in the current image. This is a read-only property.
Type number
Accessors Get
Availability v7.0+
Usage notes This property is only valid after IsBlankImageExpress is called.
BlankImageMaxStdDev
Returns or sets the deviation of the pixels in an image.
Type number
Accessors Get Set
Availability All versions.
Usage notes [0, 100] is the interval of allowed values, inclusive. 0 gives a single-color image. The default value is 1.
This property is only valid after IsBlankImageExpress is called.
BlankImageThreshold
Returns or sets the dividing line between black and white.
Type number
Accessors Get Set
Availability All versions.
Usage notes [0, 255] is the interval of allowed values, inclusive. The default value is 128.
This property is only valid after IsBlankImageExpress is called.
CurrentImageIndexInBuffer
Returns the index (0-based) of the current image selected by Dynamic Web TWAIN or sets the image with the specified index as the current image.
Type number
Accessors Get Set
Availability All versions.
Usage notes By changing CurrentImageIndexInBuffer, you can enumerate all the images in buffer.
When CurrentImageIndexInBuffer changes, the control will be redrawn to reflect the change.
When image buffer is full, that is HowManyImagesInBuffer = MaxImagesInBuffer, any acquired or loaded image will replace the existing one positioned by CurrentImageIndexInBuffer. For example, if
  1. MaxImagesInBuffer is set to 4
  2. HowManyImagesInBuffer returns 4
  3. CurrentImageIndexInBuffer is 3
When a new image is acquired, the CurrentImageIndexInBuffer is set back to 0, and the first image is replaced by the newly acquired one . If another image is acquired, CurrentImageIndexInBuffer is set to 1 and the second image is replaced by the new one.
HowManyImagesInBuffer
Returns how many images are currently loaded in Dynamic Web TWAIN. This is a read-only property.
Type number
Accessors Get
Availability All versions.
ImageLayoutDocumentNumber
Returns the document number of the current image. This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes The document number is assigned by the source and is useful for grouping pages together. Usually a physical representation, this could just as well be a logical construct. Initial value is 1. Increment when a new document is placed into the document feeder (usually tell this has happened when the feeder empties). Resets when no longer acquiring from the feeder.
ImageLayoutDocumentNumber property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
ImageLayoutFrameBottom
Returns the value of the bottom edge of the current image frame (in Unit). This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes The unit of ImageLayoutFrameBottom property is determined by Unit property.
The default unit is assumed to be "inches" unless it has been otherwise negotiated between the application and Data Source.
ImageLayoutFrameBottom property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
The frame information here is only about the current frame. To get the information about all the frames to be transferred in an acquire session, please use capability negotiation. The capability to be negotiated is ICAP_FRAMES (4372).
ImageLayoutFrameLeft
Returns the value of the left-most edge of the current image frame (in Unit). This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes The unit of ImageLayoutFrameLeft property is determined by Unit property.
The default unit is assumed to be "inches" unless it has been otherwise negotiated between the application and Data Source.
ImageLayoutFrameLeft property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
The frame information here is only about the current frame. To get the information about all the frames to be transferred in an acquire session, please use capability negotiation. The capability to be negotiated is ICAP_FRAMES (4372).
ImageLayoutFrameNumber
Returns the frame number of the current image. This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes Usually a chronological index of the acquired frames, these frames are related to one another in some way. Usually, they were acquired from the same page. The source assigns these values. Initial value is 1. Reset when a new page is acquired.
ImageLayoutFrameNumber property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
The frame information here is only about the current frame. To get the information about all the frames to be transferred in an acquire session, please use capability negotiation. The capability to be negotiated is ICAP_FRAMES (4372).
ImageLayoutFrameRight
Returns the value of the right-most edge of the current image frame (in Unit). This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes The unit of ImageLayoutFrameRight property is determined by Unit property.
The default unit is assumed to be "inches" unless it has been otherwise negotiated between the application and Data Source.
ImageLayoutFrameRight property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
The frame information here is only about the current frame. To get the information about all the frames to be transferred in an acquire session, please use capability negotiation. The capability to be negotiated is ICAP_FRAMES (4372).
ImageLayoutFrameTop
Returns the value of the top-most edge of the current image frame (in Unit). This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes The unit of ImageLayoutFrameTop property is determined by Unit property.
The default unit is assumed to be "inches" unless it has been otherwise negotiated between the application and Data Source.
ImageLayoutFrameTop property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
The frame information here is only about the current frame. To get the information about all the frames to be transferred in an acquire session, please use capability negotiation. The capability to be negotiated is ICAP_FRAMES (4372).
ImageLayoutPageNumber
Returns the page number of the current image. This is a read-only property.
Type number
Accessors Get
Availability All versions.
Usage notes Increment for each page fed from the feeder.
ImageLayoutPageNumber property, along with other properties about the current image information, is valid only in OnPreTransfer and OnPostTransfer event.
ImagePixelType
Returns the pixel type of the current image. This is a read-only property.
Type EnumDWT_PixelType
Accessors Get
Availability All versions.
Usage notes Please note the property is only valid in OnPreTransfer and OnPostTransfer event.
MagData
Returns the magnetic data if the data source supports magnetic data recognition. This is a read-only property.
Type number
Accessors Get
Availability v8.0+
Usage notes Whether it works depends on the scanner's capability. Binary information is not supported.
MagType
Returns the magnetic type if the data source supports magnetic data recognition. This is a read-only property.
Type EnumDWT_MagType
Accessors Get
Availability v8.0+
SelectedImagesCount
Returns or sets how many scanned images are, or will be, selected.
Type number
Accessors Get Set
Availability v6.0+

results matching ""

    No results matching ""

    results matching ""

      No results matching ""