Dynamsoft.Twain Summary description for TwainBase. open the data source in m_idSourceList open the default data source Function name: OpenSourceManager Description: Load source manager and open it Return: TRUE: successful, FALSE: failed. The client should call GetErrorCode and GetErrorString to get more information Steps: 1. load source manager 2. open it 3. populate source list Comment: there is not a callable function of LoadSourceManager Summary description for TwainOperateWrapper. Dispose the object. Frees unmanaged resources used by the object. The object becomes unusable after that. The method needs to be called only in the case if unmanaged image was allocated using method. In the case if the class instance was created using constructor, this method does not free unmanaged memory. Dispose the object. Indicates if disposing was initiated manually. Summary description for ConstStringHelper. stores a set of four integers that represent the location and size of a rect. Gets the x-coorindate of the upper-left corner of the rect. Gets the y-coorindate of the upper-left corner of the rect. Gets the y-coorindate of the bottom-right corner of the rect. Gets the x-coorindate of the bottom-right corner of the rect. Summary description for Util. Clone image. Source image. Return clone of the source image. The original Bitmap.Clone() does not produce the desired result - it does not create an actual clone (it does not create a copy of the image). That is why this method was implemented to provide the functionality. Clone image. Source image data. Clones image from source image data. The message does not clone pallete in the case if the source image has indexed pixel format. Copy block of unmanaged memory. Destination pointer. Source pointer. Memory block's length to copy. Return's value of - pointer to destination. This function is required because of the fact that .NET does not provide any way to copy unmanaged blocks, but provides only methods to copy from unmanaged memory to managed memory and vise versa. A class that provides functionality to get image data from all TWAIN compatible devices. Displays the source's built-in interface to acquire image. True indicates success. False indicates failure. When an error occurs, please check TwainException. This method does the same thing as EnableSource(). This method is used to help users to handle Twain-compliant image acquisition devices without knowing the terms used in Twain specification. Gets the information of the capability specified by the Capability property. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please set Capability property before invoking CapGet(). If only one type for the returned value of this capability is supported, there is no need to set CapType property since it will be returned from the source when CapGet() is called. Returns the current value of the specified capability for the source. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please set Capability property before invoking CapGetCurrent(). After calling CapGetCurrent(), please check CapType property for the type this capability supports. This process is similar to CapGet(), please refer to CapType property. Returns the default value for the specified capability of the source. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please set Capability property before invoking CapGetDefault(). Checks if the source supports a particular operation of the capability. TWQC type: specifies the type of capability operation. Value Description TWQC_GET (1): If CapGet() is supported by the capability. TWQC_SET (2): If CapSet() is supported by the capability. TWQC_GETDEFAULT (4): If CapGetDefault() is supported by the capability. TWQC_GETCURRENT (8): If CapGetCurrent() is supported by the capability. TWQC_RESET (16): If CapReset() is supported by the capability. True indicates success. False indicates failure. When an error occur, please check TwainException. Please set Capability property before calling CapIfSupported(). Resets the current capability. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please set Capability property before invoking CapReset. Sets the detailed information of the specified capability. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please refer to How to Negotiate Capability with Different Capability Container Types for details. Sets the values of the specified frame. Specifies which frame to set. The index is 0-based. Specifies the value (in ICAP_UNITS) of the left edge of the specified frame. Specifies the value (in ICAP_UNITS) of the top edge of the specified frame. Specifies the value (in ICAP_UNITS) of the right edge of the specified frame. Specifies the value (in ICAP_UNITS) of the bottom edge of the specified frame. True indicates success. False indicates failure. When an error occurs, please check TwainException. The default unit is "inches" unless it has been otherwise negotiated between the application and the source. Closes Data Source. True indicates success. False indicates failure. When an error occurs, please check TwainException. CloseSource() will be called automatically when exiting the application since Dynamic .NET TWAIN has a built-in Wizard Mode. Closes and unloads Data Source Manager. True indicates success. False indicates failure. When an error occurs, please check TwainException. CloseSourceManager() will be called automatically when exiting the application if it is not called explicitly by the application. Disables the source. If the source's user interface is displayed when the source is enabled, it will be closed. True indicates success. False indicates failure. When an error occurs, please check TwainException. After DisableSource() is called, the Source will be in State 4(Source is opened but not enabled) where you can do capability negotiationn. Enables the source which means start the scanning process. True indicates success. False indicates failure. When an error occurs, please check TwainException. modified by soul/Vincy Ejects the current page and begins scanning the next page in the document feeder. True indicates success. False indicates failure. When an error occurs, please check TwainException. Please set this method after opening the Data Source (see OpenSource() method) and IfFeederEnabled property is set to true. Loads the currently selected source into main memory and initialize it for image acquisition. If no source is specified (neither SelectSource() nor SelectSourceByIndex() has been called), the default source will be loaded. True indicates success. False indicates failure. When an error occurs, please check TwainException. OpenSource() should be called before capability negotiation. The capability is available after OpenSource is called. modified by soul/Vincy Set the time-out used to open a specified Data Source. Loads and opens Data Source Manager. True indicates success. False indicates failure. When an error occurs, please check TwainException. If application identification information needs to be set, it should be set before OpenSourceManager(). Dynamic .NET TWAIN has a built-in Wizard Mode. With Wizard Mode, OpenSourceManager() is called automatically when needed by methods like EnableSource() or SelectSource(). OpenSourceManager() populates Source NameItems property with a list of installed sources. SourceNameItems property along with other properties and methods can be used to customize source selection interface. Resets the image layout in the Data Source to default. True indicates success. False indicates failure. When an error occurs, please check TwainException. If IfFeederEnabled is true, the source will return the current page to the input side of the document feeder and feed the last page from the outside of the feeder back into the acquisition area. True indicates success. False indicates failure. When an error occurs, please check TwainException. Brings up the TWAIN Data Source Manager's Source Selection User Interface (UI) so that the user can choose which Data Source to be the current Source. True indicates success. False indicates failure. When an error occurs, please check TwainException. // modified by soul/Vincy Selects a Data Source by its index in the Data Source Managet. int iIndex. It is the index of the target Data Source in SourceNameItems property. True indicates success. False indicates failure. When an error occurs, please check TwainException. The index is 0-based. Sets the left, top, right, and bottom sides of the image layout rectangle for the current Data Source. In other words, sets which area will be scanned. Float fLeft: specifies the floating-point number for the left side of the image layout rectangle. Float fTop: specifies the floating-point number for the top side of the image layout rectangle. Float fRight: specifies the floating-point number for the right side of the image layout rectangle. Float fBottom: specifies the floating-point number for the bottom side of the image layout rectangle. True indicates success. False indicates failure. When an error occurs, please check TwainException. The image layout rectangle defines what portion of the Data Source's scanning area is acquired. Please set unit property before using this method Loads the configurations of the source's users interface saved by SaveCustomDSData or SaveCustomDSDataEx. The path of the file used for storing custom Data Source data.e.g."C:\\webtwain.jpg" True indicates success. False indicates failure. When an error occurs, please check TwainException. You can set IfShowUI to true to display the user interface of the source. Loads the configurations of the source's users interface saved by SaveCustomDSData or SaveCustomDSDataEx. The string of the file which represents the custom Data Source data. True indicates success. False indicates failure. When an error occurs, please check TwainException. You can set IfShowUI to true to display the user interface of the source. Saves the settings of the source's user interface. The absolute path of the file where the custom Data Source data is stored. True indicates success. False indicates failure. When an error occurs, please check TwainException. You can set IfShowUI to true to display the user interface of the source. After saving the settings of the UI, you can use LoadCustomDSData or LoadCustomDSDataEx to restore the configurations. Saves the settings of the source's user interface. The string of the file which represents the custom Data Source data. True indicates success. False indicates failure. When an error occurs, please check TwainException. You can set IfShowUI to true to display the user interface of the source. After saving the settings of the UI, you can use LoadCustomDSData or LoadCustomDSDataEx to restore the configurations. Retrieves the left, top, right, and bottom sides of the current Data Source's default image layout rectangle. The floating-point number for the left side of the default image layout rectangle. The floating-point number for the top side of the default image layout rectangle. The floating-point number for the right side of the default image layout rectangle. The floating-point number for the bottom side of the default image layout rectangle. True indicates success. False indicates failure. When an error occurs, please check TwainException. The image layout rectangle defines what portion of the Data Source's scanning area is acquired. Retrieves the left, top, right, and bottom sides of the image layout rectangle for the current Data Source. The floating-point number for the left side of the image layout rectangle. The floating-point number for the top side of the image layout rectangle. The floating-point number for the right side of the image layout rectangle. The floating-point number for the bottom side of the image layout rectangle. True indicates success. False indicates failure. When an error occurs, please check TwainException. The image layout rectangle defines the portion of the Data Source's scanning area. Holds an array of source names. The index is 0-based and can not be larger than SourceCount property. A list of source names. When an error occurs, please check TwainException. This property has a parameter. Returns an array of values of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. This is a runtime property. The index is 0-based. Capability property value. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. This property has a parameter. The data type of the parameter is int and it is 0-based. The GetCapItems is used to return the result in Double, Single(Float), Long, Integer and Boolean types. To return String type, please use GetCapItemsString. When using Double type for Boolean type, 1 indicates true, 0 indicates false. The constant true/false of Visual Basic can NOT be used. This property is similar to CapValue property and CapValueString property. CapValueString property is used to present String type while CapValue is used to present other types. CapValue property and CapValueString property are used when the container type is TWON_ONEVALUE. Sets an array of values of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. This is a runtime property. The index is 0-based. Capability property value. True indicates success. False indicates failure. When an error occurs, please check TwainException. After setting this property, call CapSet() method to set the value. The SetCapItems property is used to return the results of Double, Single(Float), Long, Integer and Boolean types. To return String type, please use SetCapItemsString. When using Double type for Boolean type, 1 indicates true, 0 indicates false. The constant true/false of Visual Basic can NOT be used. This property is similar to CapValue property and CapValueString property. CapValueString property is used to present String type while CapValue is used to present other types. CapValue property and CapValueString property are used when the container type is TWON_ONEVALUE. Returns or sets an array of values of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. This is a runtime property. The index is 0-based. Capability property value. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. This property has a parameter. The data type of the parameter is int and it is 0-based. GetCapItemsString is used to return String values. For other data types, please use GetCapItems. Sets an array of values of the capability specified by Capability property, when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. This is a runtime property. The index is 0-based. Capability property value. True indicates success. False indicates failure. When an error occurs, please check TwainException. After setting this property, please call CapSet() method to set the value. SetCapItemsString property is used to set String type values. For other data types, please use SetCapItems property. Gets barcode content by specified index. It's only valid in OnPostTransfer event. Specifies the index of barcode in image. The index is 0-based. Barcode content. When an error occurs, please check TwainException. An empty string will be returned if the Source doesn't support barcode detection or the image data doesn't contain barcode. GetBarcodeText method along with other properties about information of the current image is valid only in OnPostTransfer event. Gets barcode type value by specified index and type. The index is 0-based. It's only valid in OnPostTransfer event. Defined in TWAIN specification. Specifies the index of barcode in image. The index is 0-based. No limit When an error occurs, please check TwainException. GetBarcodeInfo method along with other properties about information of the current image is valid only in OnPostTransfer event. Displays the user interface of the source to change and save the settings for DPI, paper size, etc. True indicates success. False indicates failure. When an error occurs, please check TwainException. modified by ellie/Vincy Sets an application window handle. It's not required by default. Please call it when the scanning process fails to start. e.g. ScanInNewProcess is set to false or the source is not available. Application window handle It's not required by default. Please call it when the scanning process fails to start. e.g. ScanInNewProcess is set to false or the source is not available. Returns or sets the pixel bit depth for the current value of PixelType property. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). This property supports 1,8,24,32bit. Returns or sets the brightness for scanning by the Data Source. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Specifies the capability to be negotiated. This is a runtime property. When an error occurs, please check TwainException. Prior to negotiating capability, OpenSource() needs to be called to make Dynamic .NET TWAIN ready for capability negotiation. Returns or sets the index (0-based) of the current value of a capability. It will return a list to indicate the Current Value when the value of the CapType property is TWON_ENUMERATION. If the data type of the capability is String, the list is in GetCapItemsString. For other data types, the list is in GetCapItems. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, you can call CapSet() method to set its value. The CapCurrentIndex property is 0-based. It is valid only when the CapType property is TWON_ENUMERATION. For information of which properties are valid for different container types, please refer to CapType property. Returns or sets the current value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, you can call CapSet() method to set its value. CapCurrentValue property is valid only when the value of the CapType property is TWON_RANGE. For information of which properties are valid for different container types, please refer to CapType property. Returns the index (0-based) of the default value of a capbility. It will return a list to indicate the Default Value when the value of the CapType property is TWON_ENUMERATION. when the value of the CapType property is TWON_ENUMERATION. If the data type of the capability is String, the list is in GetCapItemsString. For other data types, the list is in GetCapItems property. This is a runtime, read-only property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. The CapDefaultIndex property is 0-based and read-only. It is valid only when the CapType property is TWON_ENUMERATION. For information of which properties are valid for different container types, please refer to CapType property. Returns the default value in a range when the value of the CapType property is TWON_RANGE. This is a runtime, read-only property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. Default value reflects the source's power-on value. It can NOT be set. CapDefaultValue property is valid only when the value of the CapType property is TWON_RANGE. For information of which properties are valid for different container types, please refer to CapType property. Returns or sets the maximum value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. CapMaxValue property is valid only when the value of the CapType property is TWON_RANGE. To see the properties valid for different container types, please refer to CapType property. Returns or sets the minimum value in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. CapMinValue property is valid only when the value of the CapType property is TWON_RANGE. To see the properties valid for different container types, please refer to CapType property. Returns or sets how many items are in the list when the value of the CapType property is TWON_ARRAY or TWON_ENUMERATION. For String data type, the list is in GetCapItemsString. For other data types, the list is in GetCapItems. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. Returns or sets the step size in a range when the value of the CapType property is TWON_RANGE. This is a runtime property. When an error occurs, please check TwainException. Please read this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. CapStepSize property is valid only when the value of the CapType property is TWON_RANGE. To see the properties valid for different container types, please refer to CapType property. Returns or sets the type of capability container used to exchange capability information between application and source. This is a runtime property. When an error occurs, please check TwainException. Allowed Values Description TWON_ARRAY(3) An array of associated individual values. CapNumItems property, GetCapItems/SetCapItems/GetCapItemsString/SetCapItemsString methods are valid. TWON_ENUMERATION(4) A group of associated individual values. The values are ordered from the lowest to highest, but the step size between every two values might not be the same. CapNumItems property, CapCurrentIndex property, CapDefaultIndex property, GetCapItems/SetCapItems/GetCapItemsString/SetCapItemsString methods are valid. TWON_ONEVALUE(5) A single value. CapValue property and CapValueString property are valid. TWON_RANGE(6) A range of individual values. CapMinValue property, CapMaxValue property, CapStepSize property, CapDefaultValue property and CapCurrentValue property are valid.
Please set CapType when setting a capability with CapSet. Please check CapType after reading a capability by CapGet. CapDefaultIndex property and CapDefaultValue property reflect power-on values and are not available with CapSet().
Returns or sets the value type for reading the value of a capability. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. Returns or sets the value of the capability specified by Capability property when the value of the CapType property is TWON_ONEVALUE. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. The Double type of CapValue property is used to present Double, Single(Float), Long, Integer and Boolean types. For String type, please use CapValueString property. When using Double type for Boolean type, 1 indicates true, 0 indicates false. The constant true/false of Visual Basic can NOT be used. This property is similar to GetCapItems and GetCapItemsString. GetCapItemsString is used to present String type while GetCapItems is used to present other types. GetCapItems and GetCapItemsString are used when the container type is TWON_ARRAY or TWON_ENUMERATION. Returns or sets the string value for a capability when the value of the CapType property is TWON_ONEVALUE. This is a runtime property. When an error occurs, please check TwainException. Please check this property after calling CapGet() method. After setting this property, please call CapSet() method to set the value. CapValueString property is used to set or return String type value. For any other data types when the CapType property is TWON_ONEVALUE, please use CapValue property. Returns or sets the contrast of the Source. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). ??? note remove WebcamManager Returns the device name of the current source. This is a runtime, read-only property. When an error occurs, please check TwainException. If no source is currently selected, CurrentSourceName property will return "". Returns a value indicating the data source status. This is a runtime, read-only property. When an error occurs, please check TwainException. Allowed values are between 0 and 3, defined in TWDataSourceStatus. 0, indicates the data source is closed. 1, indicates the data source is opened. 2, indicates the data source is enabled. 3, indicates the data source is acquiring image. Returns the name of default source. This is a runtime, read-only property. When an error occurs, please check TwainException. ???? Returns whether the source supports duplex. If yes, it further returns the level of duplex the Source supports (one pass or two pass duplex). This is a runtime, read-only property. When an error occurs, please check TwainException. Values Duplex 0 Duplex is not supported 1 1-pass duplex 2 2-pass duplex Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns or sets whether to enable Auto-brightness feature for the Data Source. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns or sets whether to enable the automatic document feeding process for the Data Source. This is a runtime property. When an error occurs, please check TwainException. If the value of this property is true, the Source will automatically feed the next page from the document feeder after the previous page is acquired. Please set this property after opening the Data Source and checking if IfFeederEnabled property is true. Returns or sets whether to enables the automatic document scanning process for the Data Source. This is a runtime property. When an error occurs, please check TwainException. If the value of this property is true, the Source will automatically feed the next page from the document feeder after the previous page is acquired. Please set this property after opening the Data Source and checking if IfFeederEnabled property is true. Returns whether the Source is attached, powered on and communicating. This is a runtime, read-only property. When an error occurs, please check TwainException. Returns or sets whether to close the User Interface after all images have been scanned and transferred. The default value of this property is false. When an error occurs, please check TwainException. IfShowUI IfDisableSourceAfterAcquire Actions true false UI will be shown, one or many images will be acquired(if supported by the DataSource), UI will not be closed automatically and needs to be closed manually. true true UI will be shown, one or many images will be acquired(if supported by the DataSource), UI will be closed automatically. false false UI will not be shown, one or many images will be acquired(if supported by the DataSource), UI will not be closed automatically and needs to be closed manually. false true UI will not be shown, one or many images will be acquired(if supported by the DataSource), UI will be closed automatically. Returns or sets whether the Source supports duplex. If true, the scanner scans both sides of a paper. Otherwise, the scanner will scan only one side of the paper. This is a runtime property. When an error occurs, please check TwainException. Call OpenSource() method and confirm that the duplex is supported before using this property. Returns or sets whether the Automatic Document Feeder (ADF) is enabled. This is a runtime property. When an error occurs, please check TwainException. If the property is set to true, the Data Source will try acquiring images from the document feeder first and other feeder related capabilities can be used. If the value of this property is false, the Data Source will try acquiring data from the flatbed first and none of the feeder related capabilities can be used. Call OpenSource() method before using this property. Returns whether or not there are documents loaded in the Data Source's feeder when IfFeederEnabled and IfPaperDetectable are true. This is a runtime, read-only property. When an error occurs, please check TwainException. Call OpenSource() method before using this property. Returns or sets whether the UI (User Interface) of Source runs in modal state. The default value of this property is true. When an error occurs, please check TwainException. If the property is true, the TWAIN Data Source will display its User Interface in modal window when invoking AcquireImage method. Returns whether the Source has a paper sensor that can detect documents on the ADF or Flatbed. This is a runtime, read-only property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method. Returns or sets whether the Source displays a progress indicator during acquisition and transfer regardless of the status of the Source's user interface. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns or sets whether the Source displays the User Interface. When an error occurs, please check TwainException. If the property is true, the TWAIN Data Source will display its User Interface when invoking the AcquireImage method. If the property is false, the Data Source UI will not be displayed and scanning will begin immediately using the current settings. Returns whether the Source supports acquisitions with the UI (User Interface) disabled. 'False' indicates that this Source can only support acquisitions with the UI enabled. This is a runtime, read-only property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method. Returns the number of bits in each image pixel (or bit depth). This is a runtime, read-only property. When an error occurse, please check TwainException. BitsPerPixel of a 24-bit RGB image is 24. BitsPerPixel for an 8-bit Grayscale image is 8. BitsPerPixel for a Black and White image is 1. ImageBitsPerPixel property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event. Returns the document number of the current image. This is a runtime, read-only property. When an error occurs, please check TwainException. Usually, increment when a group of new pages is placed into the document feeder (usually tell this has happened when the feeder empties). ImageLayoutDocumentNumber property, along with other properties about information of the current image, is valid only in OnPreTransfer and OnPostTransfer event. Returns the frame number of the current image. This is a runtime, read-only property. When an error occurs, please check TwainException. The frames are acquired from the same page. The number will be reset when a new page is acquired. ImageLayoutFrameNumber property along with other properties about information of the current image 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 transferred in an acquire session, please use capability ICAP_FRAMES instead. Please refer to How To Negotiate ICAP_FRAMES for details and sample code. Returns the page number of the current image. This is a runtime, read-only property. When an error occurs, please check TwainException. This property will increase as the acquired page number increased. ImageLayoutPageNumber property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event. Returns the height of the image in pixel. This is a runtime, read-only property. When an error occurs, please check TwainException. If the Source such as handheld scanners failed to calculate the length of the image, -1 will be returned. ImageLength property along with other properties about information of the current imag, is valid only in OnPreTransfer and OnPostTransfer event. Returns the pixel type of the current image. This is a runtime, read-only property. When an error occurs, please check TwainException. Values Description TWPT_BW(0) Black and White TWPT_GRAY(1) Grayscaled TWPT_RGB(2) RGB
ImagePixelType property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event.
Returns the width of the image in pixel. This is a runtime, read-only property. When an error occurs, please check TwainException. If the Source such as handheld scanners failed to calculate the length of the image, -1 will be returned. ImageWidth property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event. Returns the X resolution of the current image. X resolution is the number of pixels per ICAP_UNITS in the horizontal direction. This is a runtime, read-only property. When an error occurs, please check TwainException. The unit of ImageXResolution property is set by ICAP_UNITS capability. The default unit is "inches" unless it has been otherwise negotiated between the application and source. ImageXResolution property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event. Returns the Y resolution of the current image. Y resolution is the number of pixels per ICAP_UNITS in the vertical direction. This is a runtime, read-only property. When an error occurs, please check TwainException. The unit of ImageYResolution property is set by ICAP_UNITS capability. The default unit is "inches" unless it has been otherwise negotiated between the application and source. ImageYResolution property along with other properties about information of the current image is valid only in OnPreTransfer and OnPostTransfer event. Returns or sets the page size(s) the Source uses to acquire image data. This is a runtime property. Please set the pagesize value in enum . When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns the number of transfers the Source is ready to supply, upon demand. This is a runtime, read-only property. When an error occurs, please check TwainException. This property is valid only in OnPostTransfer event. The Data Source will return -1 if it is not sure how many transfers are pending. Scanners with ADF (Automatic Document Feeder) will typically return -1 if the current image is not the last one. Returns or sets the pixel flavor for acquired images. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Allowed Values Description 0 Chocolate. Zero pixel represents darkest shade. 1 Vanilla. Zero pixel represents lightest shade. The default value is 0 i.e. the default value of PixelFlavor is Chocolate. Returns or sets the pixel type of acquired images. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Allowed Values PixelType TWICapPixelType 0 BW 1 GRAY 2 RGB 3 PALETTE 4 CMY 5 CMYK 6 YUV 7 YUVK 8 CIEXYZ Returns or sets the current resolution for image acquisition. This is a runtime property. When an error occurs, please check TwainException. Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns how many sources are available on the local system. This is a runtime, read-only property. When an error occurs, please check TwainException. If SourceCount is 0, it means no source is available or the Source Manager is not open. Returns or sets the transfer mode. Please set the value of transfer mode in enum . When an error occurs, please check TwainException. The default value for TransferMode property is TWSX_NATIVE (0). For DISK FILE mode, since it is not required by TWAIN, the application needs to make sure it is supported by the current Source. One way to do this is checking the TransferMode property after OpenSource() to see if it is still TWSX_FILE. Returns or sets the unit of measure. This is a runtime property. When an error occurs, please check TwainException. Allowed Values Unit 0 INCHES 1 CENTIMETERS 2 PICAS 3 POINTS 4 TWIPS 5 PIXELS Please set this property after calling OpenSource() method and before calling AcquireImage(). Returns and sets the number of images your application will transfer per session. This is a runtime property. When an error occurs, please check TwainException. Allowed values are between -1 and 32767. 'N' indicates N images. '-1' indicates multiple images. Please set this property after calling OpenSource() method. Returns or sets the maximum standard deviation threshold of the pixels in an image which will be used to determine whether an image is blank. When an error occurs, please check TwainException. The allowed values are from 0 to 100. 0 means it is a single-color image. The default value is 1. Returns or sets the dividing line between black and white. The default value is 128. When an error occurs, please check TwainException. The allowed values are from 0 to 255. The default value is 128. Returns or sets the manufacture string for the application identity. When an error occurs, please check TwainException. The Manufacturer property is a part of the application identity. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties. These information may be shown in Source's interface. Returns or sets the product family string for the application identity. When an error occurs, please check TwainException. The ProductFamily property is a part of the application identity. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties. These information may be shown in Source's interface. Returns or sets the product name string for the application identity. When an error occurs, please check TwainException. The ProductName property is a part of the application identity. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties. These information may be shown in Source's interface. Returns or sets the version info string for the application identity. When an error occurs, please check TwainException. The VersionInfo property is a part of the application identity. The application identity consists of the Manufacturer, ProductFamily, ProductName and VersionInfo properties. These information may be shown in Source's interface. Returns the number of barcode detected in an image. It's only valid in OnPostTransfer event. When an error occurs, please check TwainException. If the Source doesn't contain barcode or doesn't supported barcode, 0 will be returned. BarcodeCount property along with other properties about information of the current image is valid only in OnPostTransfer event. Returns or sets whether enable the debug mode of Dynamic .NET TWAIN. // When an error occurs, please check TwainException. The default value is 0. When the value i is set to 1, Dynamic .NET TWAIN will send all messages to an external Debugger tool for display. (eg. DgbView.exe) Returns the magnetic type if the scanner supports magnetic data recognition. This is a read-only property. Only valid when ScanInNewProcess is true Returns the magnetic data if the scanner supports magnetic data recognition. This is a read-only property. This property needs scanner suppor and is valid only when ScanInNewProcess is true Acquires image in a new separate process. Default value is true. ScanInNewProcess should be called prior to negotiating capability. It's used to set how much information is returned by the scanner in case IAcquireCallback.IfGetExtImageInfo is true. By default, it's 0 and that means the basic info will be retrived. If set to 1, it will try to query all the defined info in TWAIN. If set to 2, it will try to query all the defined info in TWAIN and the custom info. Returns or sets whether to prevent other windows covering the Scanner UI. The default value of this property is true. Capabilities exist in many varieties but all of them have a Default Value and a Current Value and may also have other values available. To help categorize the supported values into clear structures, TWAIN defines four types of containers for capabilities: TW_ONEVALUE, TW_ARRAY, TW_RANGE and TW_ENUMERATION. Nothing. A rectangular array of values that describe a logical item. It is similar to the TW_ONEVALUE because the current and default values are the same and there are no other values to select from. For example, a list of the names, such as the supported capabilities list returned by the CAP_SUPPORTEDCAPS capability, would use this type of container. This is the most general type because it defines a list of values from which the Current Value can be chosen. The values do not increase uniformly through a range and there is no constant step-size between 2 values. For example, if the step size of a Source's resolution is not the same, then the enumeration can be used (for example, 150, 400, and 600). A single value whose current and default values are coincident. The range of available values for this type of capability is simply this single value. For example, a capability that indicates the presence of a document feeder could be of this type. Many capabilities allow users to select their current value from a range of regularly spaced values. The capability can specify the minimum and maximum acceptable values and the incremental step size between the values. For example, resolution might be supported from 100 to 600 in steps of 50 (100, 150, 200, ..., 550, 600). Capabilities. Nothing. The application is willing to accept this number of images. Allows the application and Source to identify which compression schemes they have in common for Buffered Memory and File transfers. Note for File transfers: Since only certain file formats support compression, this capability must be negotiated after setting the desired file format with ICAP_IMAGEFILEFORMAT. The type of pixel data that a Source is capable of acquiring (for example, black and white, gray, RGB, etc.). Unless a quantity is dimensionless or uses a specified unit of measure, ICAP_UNITS determines the unit of measure for all quantities. Allows the application and Source to identify which transfer mechanisms the source supports. The name or other identifying information about the Author of the image. It may include a copyright string. A general note about the acquired image. If TRUE, Source must acquire data from the document feeder acquire area and other feeder capabilities can be used. If FALSE, Source must acquire data from the non-feeder acquire area and no other feeder capabilities can be used. Reflects whether there are documents loaded in the Source’s feeder. The date and time the image was acquired. Stored in the form “YYYY/MM/DD HH:mm:SS.sss” where YYYY is the year, MM is the numerical month, DD is the numerical day, HH is the hour, mm is the minute, SS is the second, and sss is the millisecond. Returns a list of all the capabilities for which the Source will answer inquiries. Does not indicate which capabilities the Source will allow to be set by the application. Some capabilities can only be set if certain setup work has been done so the Source cannot globally answer which capabilities are “set-able.” Allows the application and Source to negotiate capabilities to be used in States 5 and 6. If TRUE, the Source will automatically feed the next page from the document feeder after the number of frames negotiated for capture from each page are acquired. CAP_FEEDERENABLED must be TRUE to use this capability. If TRUE, the Source will eject the current page being acquired from and will leave the feeder acquire area empty. If CAP_AUTOFEED is TRUE, a fresh page will be advanced. CAP_FEEDERENABLED must equal TRUE to use this capability. This capability must have been negotiated as an extended capability to be used in States 5 and 6. If TRUE, the Source will eject the current page and advance the next page in the document feeder into the feeder acquire area. If CAP_AUTOFEED is TRUE, the same action just described will occur and CAP_AUTOFEED will remain active. CAP_FEEDERENABLED must equal TRUE to use this capability. This capability must have been negotiated as an extended capability to be used in States 5 and 6. 20170104 If TRUE, the Source will return the current page to the input side of the document feeder and feed the last page from the output side of the feeder back into the acquisition area. If CAP_AUTOFEED is TRUE, automatic feeding will continue after all negotiated frames from this page are acquired. CAP_FEEDERENABLED must equal TRUE to use this capability. This capability must have been negotiated as an extended capability to be used in States 5 and 6. If TRUE, the Source will display a progress indicator during acquisition and transfer, regardless of whether the Source’s user interface is active. If FALSE, the progress indicator will be suppressed if the Source’s user interface is inactive. The Source will continue to display device-specific instructions and error messages even with the Source user interface and progress indicators turned off. Returns a list of all the capabilities for which the Source will answer inquiries. Does not indicate which capabilities the Source will allow to be set by the application. Some capabilities can only be set if certain setup work has been done so the Source cannot globally answer which capabilities are “set-able.” This capability determines whether the device has a paper sensor that can detect documents on the ADF or Flatbed. If TRUE, indicates that this Source supports acquisition with the UI disabled; i.e., TW_USERINTERFACE’s ShowUI field can be set to FALSE. If FALSE, indicates that this Source can only support acquisition with the UI enabled. If TRUE, the physical hardware (e.g., scanner, digital camera, image database, etc.) that represents the image source is attached, powered on, and communicating. This capability is intended to boost the performance of a Source. The fundamental assumption behind AutoScan is that the device is able to capture the number of images indicated by the value of CAP_XFERCOUNT without waiting for the Application to request the image transfers. This is only possible if the device has internal buffers capable of caching the images it captures. The default behavior is undefined, because some high volume devices are incapable of anything but CAP_AUTOSCAN being equal to TRUE. However, if a Source supports FALSE, it should use it as the mandatory default, since this best describes the behavior of pre-1.8 TWAIN Applications. Allows an application to request the delivery of thumbnail representations for the set of images that are to be delivered. Setting CAP_THUMBNAILSENABLED to TRUE turns on thumbnail mode. Images transferred thereafter will be sent at thumbnail size (exact thumbnail size is determined by the Data Source). Setting this capability to FALSE turns thumbnail mode off and returns full size images. This indicates whether the scanner supports duplex. If so, it further indicates whether one-path or two-path duplex is supported. The user can set the duplex option to be TRUE or FALSE. If TRUE, the scanner scans both sides of a paper; otherwise, the scanner will scan only one side of the image. Allows an application to query a source to see if it implements the new user interface settings dialog. Allows the application to specify the starting endorser / imprinter number. All other endorser/ imprinter properties should be handled through the data source’s user interface. The user can set the starting number for the endorser. Turns specific audible alarms on and off. The volume of a device’s audible alarm. Note that this control affects the volume of all alarms; no specific volume control for individual types of alarms is provided. The number of images to automatically capture. This does not refer to the number of images to be sent to the Application, use CAP_XFERCOUNT for that. For automatic capture, this value selects the number of milliseconds before the first picture is to be taken, or the first image is to be scanned. For automatic capture, this value selects the milliseconds to wait between pictures taken, or images scanned. CapGet() reports the presence of data in the scanner's buffers. CapSet() with a value of TWCB_CLEAR immediately clears the buffers. Describes the number of pages that the scanner can buffer when CAP_AUTOSCAN is enabled. The date and time of the device’s clock. Managed in the form “YYYY/MM/DD HH:mm:SS:sss” where YYYY is the year, MM is the numerical month, DD is the numerical day, HH is the hour, mm is the minute, SS is the second, and sss is the millisecond. CapGet() reports the kinds of power available to the device. CapGetCurrent() reports the current power supply in use. This capability queries the Source for UI support for preview mode. If TRUE, the Source supports preview UI. A string containing the serial number of the currently selected device in the Source. Multiple devices may all report the same serial number. CapGet() returns the current list of available printer devices, along with the one currently being used for negotiation. CapSet() selects the current device for negotiation, and optionally constrains the list. Top/Bottom refers to duplex devices, and indicates if the printer is writing on the top or the bottom of the sheet of paper. Simplex devices use the top settings. Before/After indicates whether printing occurs before or after the sheet of paper has been scanned. Turns the current CAP_PRINTER device on or off. The User can set the starting number for the current CAP_PRINTER device. Specifies the appropriate current CAP_PRINTER device mode. Note: • TWPM_SINGLESTRING specifies that the printed text will consist of a single string. • TWPM _MULTISTRING specifies that the printed text will consist of an enumerated list of strings to be printed in order. • TWPM _COMPOUNDSTRING specifies that the printed string will consist of a compound of a String followed by a value followed by a suffix string. Specifies the string(s) that are to be used in the string component when the current CAP_PRINTER device is enabled. Specifies the string that shall be used as the current CAP_PRINTER device’s suffix. Allows Application and Source to identify which languages they have in common for the exchange of string data, and to select the language of the internal UI. Since the TWLG_xxxx codes include language and country data, there is no separate capability for selecting the country. Helps the Application determine any special actions it may need to take when negotiating frames with the Source. Allowed values are listed in . TWFA_NONE: The alignment is free-floating. Applications should assume that the origin for frames is on the left. TWFA_LEFT: The alignment is to the left. TWFA_CENTER: The alignment is centered. This means that the paper will be fed in the middle of the ICAP_PHYSICALWIDTH of the device. If this is set, then the Application should calculate any frames with a left offset of zero. TWFA_RIGHT: The alignment is to the right. TWFO_FIRSTPAGEFIRST if the feeder starts with the top of the first page. TWFO_LASTPAGEFIRST is the feeder starts with the top of the last page. Indicates whether the physical hardware (e.g. scanner, digital camera) is capable of acquiring multiple images of the same page without changes to the physical registration of that page. The minutes of battery power remaining to the device. When used with CapGet(), return the percentage of battery power level on camera. If -1 is returned, it indicates that the battery is not present. TRUE enables and FALSE disables the Source’s Auto-brightness function (if any). The brightness values available within the Source. The contrast values available within the Source. Specifies the square-cell halftone (dithering) matrix the Source should use to halftone the image. Specifies the exposure time used to capture the image, in seconds. Describes the color characteristic of the subtractive filter applied to the image data. Multiple filters may be applied to a single acquisition. Specifies whether or not the image was acquired using a flash. Gamma correction value for the image data. A list of names of the halftone patterns available within the Source. Specifies which value in an image should be interpreted as the lightest “highlight.” All values “lighter” than this value will be clipped to this value. Whether lighter values are smaller or larger can be determined by examining the Current value of ICAP_PIXELFLAVOR. Informs the application which file formats the Source can generate (CapGet()). Tells the Source which file formats the application can handle (CapSet()). TWFF_TIFF Used for document TWFF_PICT Native Macintosh TWFF_BMP Native Microsoft TWFF_XBM Used for document TWFF_JFIF Wrapper for JPEG TWFF_FPX FlashPix, used with digital TWFF_TIFFMULTI Multi-page TIFF files TWFF_PNG An image format standard intended for use on the web, replaces GIF TWFF_SPIFF A standard from JPEG, intended to replace JFIF, also supports JBIG TWFF_EXIF File format for use with digital cameras. TRUE means the lamp is currently, or should be set to ON. Sources may not support CapSet() operations. Describes the general color characteristic of the light source used to acquire the image. Defines which edge of the "paper" the image's "top" is aligned with. This information is used to adjust the frames to match the scanning orientation of the paper. For instance, if an ICAP_SUPPORTEDSIZE of TWSS_ISOA4 has been negotiated, and ICAP_ORIENTATION is set to TWOR_LANDSCAPE, then the Source must rotate the frame it downloads to the scanner to reflect the orientation of the paper. Please note that setting ICAP_ORIENTATION does not affect the values reported by ICAP_FRAMES; it just causes the Source to use them in a different way. The upper-left of the image is defined as the location where both the primary and secondary scans originate. (The X axis is the primary scan direction and the Y axis is the secondary scan direction.) For a flatbed scanner, the light bar moves in the secondary scan direction. For a handheld scanner, the scanner is drug in the secondary scan direction. For a digital camera, the secondary direction is the vertical axis when the viewed image is considered upright. The maximum physical width (X-axis) the Source can acquire (measured in units of ICAP_UNITS). The maximum physical height (Y-axis) the Source can acquire (measured in units of ICAP_UNITS). Specifies which value in an image should be interpreted as the darkest “shadow.” All values “darker” than this value will be clipped to this value. The list of frames the Source will acquire on each page. The native optical resolution along the X-axis of the device being controlled by the Source. Most devices will respond with a single value (TW_ONEVALUE). This is NOT a list of all resolutions that can be generated by the device. Rather, this is the resolution of the device’s optics. Measured in units of pixels per unit as defined by ICAP_UNITS (pixels per TWUN_PIXELS yields dimensionless data). The native optical resolution along the Y-axis of the device being controlled by the Source. Measured in units of pixels per unit as defined by ICAP_UNITS (pixels per TWUN_PIXELS yields dimensionless data). All the X-axis resolutions the Source can provide. Measured in units of pixels per unit as defined by ICAP_UNITS (pixels per TWUN_PIXELS yields dimensionless data). That is, when the units are TWUN_PIXELS, both ICAP_XRESOLUTION and ICAP_YRESOLUTION shall report 1 pixel/pixel. Some data sources like to report the actual number of pixels that the device reports, but that response is more appropriate in ICAP_PHYSICALHEIGHT and ICAP_PHYSICALWIDTH. All the Y-axis resolutions the Source can provide. Measured in units of pixels per unit as defined by ICAP_UNITS (pixels per TWUN_PIXELS yields dimensionless data). That is, when the units are TWUN_PIXELS, both ICAP_XRESOLUTION and ICAP_YRESOLUTION shall report 1 pixel/pixel. Some data sources like to report the actual number of pixels that the device reports, but that response is more appropriate in ICAP_PHYSICALHEIGHT and ICAP_PHYSICALWIDTH. The maximum number of frames the Source can provide or the application can accept per page. This is a bounding capability only. It does not establish current or future behavior. This is used with buffered memory transfers. If TRUE, Source can provide application with tiled image data. Specifies how the bytes in an image are filled by the Source. TWBO_MSBFIRST indicates that the leftmost bit in the byte (usually bit 7) is the byte's Most Significant Bit. Used for CCITT Group 3 2-dimensional compression. The ‘K’ factor indicates how often the new compression baseline should be re-established. A value of 2 or 4 is common in facsimile communication. A value of zero in this field will indicate an infinite K factor—the baseline is only calculated at the beginning of the transfer. Describes whether the image was captured transmissively or reflectively. Sense of the pixel whose numeric value is zero (minimum data value). Allows the application and Source to identify which color data formats are available. There are two options, “planar” and “chunky.” How the Source can/should rotate the scanned image data prior to transfer. This doesn’t use ICAP_UNITS. It is always measured in degrees. Any applied value is additive with any rotation specified in ICAP_ORIENTATION. For devices that support fixed frame sizes. Defined sizes match typical page sizes. This specifies the size(s) the Source can/should use to acquire image data. Specifies the dividing line between black and white. This is the value the Source will use to threshold, if needed, when ICAP_PIXELTYPE = TWPT_BW. The value is normalized so there are no units of measure associated with this ICAP. All the X-axis scaling values available. A value of ‘1.0’ is equivalent to 100% scaling. Do not use values less than or equal to zero. All the Y-axis scaling values available. A value of ‘1.0’ is equivalent to 100% scaling. Do not use values less than or equal to zero. There are no units inherent with this data as it is normalized to 1.0 being “unscaled.” Used for CCITT data compression only. Indicates the bit order representation of the stored compressed codes. Used only for CCITT data compression. Specifies whether the compressed codes’ pixel “sense” will be inverted from the Current value of ICAP_PIXELFLAVOR prior to transfer. Allows the application and Source to agree upon a common set of color descriptors that are made available by the Source. This ICAP is only useful for JPEG-compressed buffered memory image transfers. Used only with CCITT data compression. Specifies the minimum number of words of compressed codes (compressed data) to be transmitted per line. Specifies the pixel bit depths for the Current value of ICAP_PIXELTYPE. For example, when using ICAP_PIXELTYPE = TWPT_GRAY, this capability specifies whether this is 8-bit gray or 4-bit gray. This depth applies to all the data channels (for instance, the R, G, and B channels will all have this same bit depth for RGB data). Specifies the Reduction Method the Source should use to reduce the bit depth of the data. Most commonly used with ICAP_PIXELTYPE = TWPT_BW to reduce gray data to black and white. If TRUE the Source will issue a MSG_XFERREADY before starting the scan. Note: The Source may need to scan the image before initiating the transfer. This is the case if the scanned image is rotated or merged with another scanned image. Allows the application to query the data source to see if it supports extended image attribute capabilities, such as Barcode Recognition, Shaded Area Detection and Removal, Skew detection and Removal, and so on. Allows the source to define the minimum height (Y-axis) that the source can acquire. Allows the source to define theminimum width (X-axis) that the source can acquire. Use this capability to have the Source discard blank images. The Application never sees these images during the scanning session. TWBP_DISABLE – this must be the default state for the Source. It indicates that all images will be delivered to the Application, none of them will be discarded. TWBP_AUTO – if this is used, then the Source will decide if an image is blank or not and discard as appropriate. If the specified value is a positive number in the range 0 to 231–1, then this capability will use it as the byte size cutoff point to identify which images are to be discarded. If the size of the image is less than or equal to this value, then it will be discarded. If the size of the image is greater than this value, then it will be kept so that it can be transferred to the Application. Flip rotation is used to properly orient images that flip orientation every other image. TWFR_BOOK The images to be scanned are viewed in book form, flipping each page from left to right or right to left. TWFR_FANFOLD The images to be scanned are viewed in fanfold paper style, flipping each page up or down. Turns bar code detection on and off. Provides a list of bar code types that can be detected by the current Data Source. The maximum number of supported search priorities. A prioritized list of bar code types dictating the order in which bar codes will be sought. Restricts bar code searching to certain orientations, or prioritizes one orientation over the other. Restricts the number of times a search will be retried if none are found on each page. Restricts the total time spent on searching for a bar code on each page. When used with CapGet(), returns all camera supported lens zooming range. Turns patch code detection on and off. A list of patch code types that may be detected by the current Data Source. The maximum number of supported search priorities. A prioritized list of patch code types dictating the order in which patch codes will be sought. Restricts patch code searching to certain orientations, or prioritizes one orientation over the other. Restricts the number of times a search will be retried if none are found on each page. Restricts the total time spent on searching for a patch code on each page. For devices that support flash. CapSet() selects the flash to be used (if any). CapGet() reports the current setting. This capability replaces ICAP_FLASHUSED, which is only able to negotiate the flash being on or off. For devices that support image enhancement filtering. This capability selects the algorithm used to improve the quality of the image. For devices that support noise filtering. This capability selects the algorithm used to remove noise. Overscan is used to scan outside of the boundaries described by ICAP_FRAMES, and is used to help acquire image data that may be lost because of skewing. This is primarily of use for transport scanners which rely on edge detection to begin scanning. If overscan is supported, then the device is capable of scanning in the inter-document gap to get the skewed image information. Turns automatic border detection on and off. Turns automatic deskew correction on and off. When TRUE this capability depends on intelligent features within the Source to automatically rotate the image to the correct position. Use this capability as a shortcut to select JPEG quantization tables that tradeoff quality versus compressed image size. Used in concert with DAT_JPEGCOMPRESSION it is possible for an Application to obtain the tables that are appropriate for varying percentages of quality within a given source. Allows the Application to set scan parameters depending upon the type of feeder. If the Source has a general type of the feeder only, default scan parameters can depend upon the type of scan (general document or photo). In this case, negotiating this capability will allow the Source adjusting the settings accordingly. It is advised, therefore, that this capabiliry be negotiated prior to the capabilities related to specific Sourve settings (like ICAP_*RESOLUTION, ICAP_PIXELTYPE, etc.) but after the other feeder-related capabilities (CAP_FEEDERENABLED, CAP_FEEDERLOADED). Informs the application if the source has an ICC profile and can embed or link it in the current ICAP_IMAGEFILEFORMAT. Tells the source if the application would like an ICC profile embedded or linked into the image file the source will write. Forces the output image dimensions to match either the current value of ICAP_SUPPORTEDSIZES or any of its current allowed values. Sets True is DAT_IMAGELAYOUT, ICAP_SUPPORTEDSIZE or ICAP_FRAMES reduces the amount of data captured from the device, potentially improving the performance of the driver, even if any automatic detection capability like ICAP_AUTOMATICBORFERDETECTION is set to TRUE. Controls the automatic detection of the length of a document, this is intended for use with an Automatic Document Feeder. The source automatically detects the pixel type of the image and returns either a color image or a non-color image sprcified by ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE. Specifies the non-color pixel type to use when automatic color is enabled. Disables the source's color and gamma tables for color and grayscale images, resulting in output that could you be termed "raw". Merges the front and rear image of a document in one of four orientations: from on the top, front on the bottom, from on the left or front on the right. Specifies a Y-Offset in ICAP_UNITS units. Front and rear images less than or equal to this value are merged according to the settings of ICAP_IMAGEMERGE. If either the front or the rear image is greater than this value, they are not merged. Allows the application to query the data source to see if it supports the operation triplet DG_IMAGE / DAT_EXTMAGEINFO / MSG_GET. Support is only available if the capabiliry is supported and the value TRUE is allowed When set to TRUE, the source supports the DG_IMAGE / DAT_EXTIMAGEINFO / MSG_GET message. and data will be returned by this call for any supported TWEI_ items. When set to FALSE, the application is indicating that it will make no calls to DG_IMAGE / DAT_EXTIMAGEINFO / MSG_GET. FALSE is the default. CAP_LANGUAGE values. TWAIN Supported sizes. 0 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 1 22 23 24 25 26 27 28 12 6 29 7 30 31 32 33 34 35 36 37 38 2 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 ICAP_DUPLEX values. CAP_FEEDERALIGNMENT values. The alignment is free-floating. Applications should assume that the origin for frames is on the left. The alignment is to the left. The alignment is centered. This means that the paper will be fed in the middle of the ICAP_PHYSICALWIDTH of the device. If this is set, then the Application should calculate any frames with a left offset of zero. The alignment is to the right. CAP_FEEDERORDER values. The feeder starts with the top of the first page. The feeder starts with the top of the last page. ICAP_XFERMECH values. Native transfers require the data to be transferred to a single large block of RAM. Therefore, they always face the risk of having an inadequate amount of RAM available to perform the transfer successfully. Disk File Mode Transfers. Buffered Memory Mode Transfers. ICAP_IMAGEFILEFORMAT values. Used for document imaging. Native Macintosh format. Native Microsoft format. Used for document imaging. Wrapper for JPEG images. FlashPix, used with digital cameras. Multi-page TIFF files. An image format standard intended for use on the web, replaces GIF. A standard from JPEG, intended to replace JFIF, also supports JBIG. File format for use with digital cameras. A file format from Adobe. A file format from the Joint Photographic Experts Group. A file format from LizardTech. A file format from Adobe. CAP_PRINTER values. CAP_PRINTERMODE values. Specifies that the printed text will consist of a single string. Specifies that the printed text will consist of an enumerated list of strings to be printed in order. Specifies that the printed string will consist of a compound of a String followed by a value followed by a suffix string. ICAP_BITDEPTHREDUCTION values. ICAP_BITORDER values. Indicates that the leftmost bit in the byte (usually bit 7) is the byte’s Most Significant Bit. ICAP_FILTER values. ICAP_FLASHUSED2 values. ICAP_FLIPROTATION values. The images to be scanned are viewed in book form, flipping each page from left to right or right to left. The images to be scanned are viewed in fanfold paper style, flipping each page up or down. ICAP_IMAGEFILTER values. Good for halftone images. Good for improving text. Good for improving fine lines. ICAP_LIGHTPATH values. ICAP_LIGHTSOURCE values. TWEI_MAGTYPE values. (MD_ means Mag Type) Added 2.0 ICAP_NOISEFILTER values. ICAP_ORIENTATION values. ICAP_OVERSCAN values. ICAP_PIXELFLAVOR values. Zero pixel represents darkest shade. Zero pixel represents lightest shade. ICAP_PIXELTYPE values. ICAP_PLANARCHUNKY values. ICAP_UNITS values. For query the operation that are supported by the data source on a capability . Application gets these through DG_CONTROL/DAT_CAPABILITY/MSG_QUERYSUPPORT Data source status. Indicate the data source is closed. Indicate the data source is opened. Indicate the data source is enabled. Indicate the data source is acquiring image. Barcode type Returns the number of bar codes found on the document image. A value of 0 means the bar code engine was enabled but that no bar codes were found. A value of -1 means the bar code engine was not enabled. This number reflects the degree of certainty the bar code engine has in the accuracy of the information obtained from the scanned image and ranges from 0 (no confidence) to 100 (supreme confidence). The Source may return a value of -1 if it does not support confidence reporting. TWBCOR_ROT0 Normal reading orientation TWBCOR_ROT90 Rotated 90 degrees clockwise TWBCOR_ROT180 Rotated 180 degrees clockwise TWBCOR_ROT270 Rotated 270 degrees clockwise TWBCOR_ROTX The orientation is not known. The bar code’s orientation on the scanned image is described in reference to a Western-style interpretation of the image. DynamicDotNetTWAIN error code. Successful. Successful. General error. No enough memory to perform the required operation. Source Manager is unable to find the specified Source. Source is connected to maximum supported number of applications. Source or Source Manager reported an error to the user and handled the error. Capability is not supported by Source or the specified operation is not supported by the capability, or capability had dependencies on other capabilities and cannot be operated upon at this time. Unrecognized operation triplet. Data parameter out of supported range. Operation out of expected sequence. Unknown destination in DSM_Entry. Capability is not supported by source. Operation is not supported by the capability. Capability has dependencies on other capabilities and cannot be operated upon at this time. File System operation is denied (file is protected). Operation failed because file already exists. File not found. Operation failed because directory is not empty. The feeder is jammed. The feeder detected multiple pages. Error writing file. The device went offline prior to or during this operation. General error. System exception. Invalid license. Can not open Source Manager. TWain_32.dll is missing or is in use by another application. Sequence error. The operation can not be performed upon the current Source Manager or Source state. User cancelled the operation. Invalid index. Invalid value. Data parameter out of supported range. The number of images exceeds the max value. MouseShape is true. Need to set MouseShape to false. Unrecognized file extension. BMP format error or not supported. Image format is not supported. Invalid image index. Original image does't exist. The operation time out. The file too big for upload. Handshake exception. Proxy username or password invalid. Protocol request is not passed. Can't connect to remote server. Malformed PASV result: Malformed PASV result (not supported): Error in reading PDF file. Error in writing PDF file. The image too big for resample. The image too big for resample. Failed to do OCR. The current selected device type not supports the method or property. There is no page to be printed. TWAIN exception class definition. Initializes a new instance of the TwainException class. Initializes a new instance of the TwainException class with a specified error message. The message that describes the error. Initializes a new instance of the TwainException class with a specified error message and error code. The message that describes the error. The error code. Get and set error code. Gets a message that describes the current exception. Gets a string representation of the frames on the call stack at the time the current exception was thrown. The callback function of the scan task. TwainManager object calls OnPreAllTransfers before all images are scanned. TwainManager object calls OnPreTransfer before each image is scanned. If it returns true, the scan job will continue. Otherwise, it will break. TwainManager object calls OnPostTransfer after each image is scanned. Scanner returned image Scanner returned image info and extended info If it returns true, the scan job will continue. Otherwise, it will break. TwainManager object calls OnPostAllTransfer after all images are scanned. TwainManager object calls OnSourceUIClose when the user clicks on the "Close" button of the Source's user interface. TwainManager object calls OnTransferCancelled when the transfer is cancelled by the user. TwainManager object calls OnTransferError when an error occurs during the process of transfer. If it is set to true the image info will be returned during scanning. If it is set to true the extended image info will be returned during scanning. This event is triggered when the transfer DynamicDotNetTWAIN exception interface definition. Get exception error code. Exception error code. Get exception error string. Exception error string. Get exception stack trace as string. Exception stack trace. from license v1, change to unsigned int64 from license v1, change to unsigned short from license v1, change to unsigned int64 from license v1, change to unsigned int A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized resource of type System.Drawing.Bitmap. Looks up a localized resource of type System.Drawing.Bitmap. Looks up a localized resource of type System.Drawing.Bitmap. Looks up a localized resource of type System.Byte[]. Looks up a localized resource of type System.Byte[]. Looks up a localized resource of type System.Drawing.Bitmap. /* DAT_IDENTITY. Identifies the program/library/code resource. */ /* DAT_SETUPFILEXFER. Sets up DS to application data transfer via a file. */ /* DAT_CAPABILITY. Used by application to get/set capability from/in a data source. */ /* TWON_ARRAY. Container for array of values (a simplified TW_ENUMERATION) */ /* TWON_ENUMERATION. Container for a collection of values. */ /* DAT_STATUS. Application gets detailed status info from a data source with this. */ /* DAT_USERINTERFACE. Coordinates UI between application and data source. */ /* DAT_IMAGEINFO. Application gets detailed image info from DS with this. */ /* DAT_PENDINGXFERS. Used with MSG_ENDXFER to indicate additional data. */ /* TWON_RANGE. Container for a range of values. */ /* DAT_IMAGEMEMXFER. Used to pass image data (e.g. in strips) from DS to application.*/ /* DAT_SETUPMEMXFER. Sets up DS to application data transfer via a memory buffer. */ /* DAT_PALETTE8. Color palette when TWPT_PALETTE pixels xfer'd in mem buf. */ /* No DAT needed. Describes version of software currently running. */ Memory handle define /* Fixed point structure type. */ /* DAT_EVENT. For passing events down from the application to the DS. */ /* No DAT. Defines a frame rectangle in ICAP_UNITS coordinates. */ /* TWON_ONEVALUE. Container for one value. */ /* No DAT needed. Used to manage memory buffers. */ /* No DAT needed. */