Device Class |
Contains information about a single device and handles the acquisition of images from that device.
Namespace: Atalasoft.Twain
The Device type exposes the following members.
Name | Description | |
---|---|---|
Alarms | Gets or sets a value which indicates if specific audible alarms are on or off. | |
AlarmVolume | Gets or sets the volume of alarms. | |
Author | Gets or sets the name or other identifying information about the Author of the image. | |
AutoBrightness | Gets or sets a value indicating if the AutoBrightness feature of the Source will be used. | |
AutoDiscardBlankPages | Gets or sets a value indicating whether the driver will automatically discard blank pages. | |
AutomaticBorderDetection | Gets or sets a value to indicate if the automatic border detection feature of the source should be used.
| |
AutomaticDeskew | Gets or sets a value indicating if the automatic deskew feature of the source should be used. | |
AutomaticRotate | Gets or sets a value indicating if the automatic rotate feature of the source should be used. | |
AutoScan | Gets or sets a value to indicate if the device should automatically acquire one image after another.
| |
AutoSize | Gets or sets the ICAP_AUTOSIZE capability which determines whether the driver is forced
to output image dimensions to match the FrameSize or its closest supported frame size.
| |
BarCode | Gets the TwainBarCode object used to control barcode features of the device. | |
BatteryMinutes | Gets the number of battery minutes remaining in the device. | |
BatteryPercentage | Gets the percentage of remaining battery power. | |
BitDepth | Gets or sets the bit depth for the acquisition. | |
BitDepthReduction | Gets or sets the BitDepthReductionMode the Source should use to reduce the bit depth of the
data. | |
Brightness | Gets or sets the amount of brightness the Source will add to the image. | |
CameraPreviewInterface | Gets a value indicating if the device supports a preview interface. | |
Caption | Gets or sets a general note about the acquired image. | |
CcittKFactor | Gets or sets the K factor indicating how often the new compression baseline should be re-established.
| |
ColorFilter | Gets or sets the color characteristic of the subtractive filter applied to the image data. | |
Compression | Gets or sets the compression used during a file or memory transfer. | |
Contrast | Gets or sets the amount of contrast the Source will add to the image. | |
Controller | Gets the TwainController used by the Device class. | |
CustomDataSupported | Gets a value indicating whether the device supported functionality used by the LoadParameters(Stream) and SaveParameters(Stream) methods. | |
DateTime | Gets or sets the date and time of the device's clock. | |
DeviceEvents | Gets or sets the device events you want to receive. | |
DisplayProgressIndicator | Gets or sets a value to indicate if the source will display a progress bar during an acquisition.
| |
DocumentFeeder | Gets the DocumentFeeder object for the device if supported. | |
Duplex | Gets the duplex mode supported by this device. | |
DuplexEnabled | Gets or sets a value indicating if the duplex feature is enabled. | |
EnableInterfaceOnly | Gets a value indicating if the source will allow you to display the source interface without acquiring an image. If the device does support this feature, you can use the ShowUserInterface() method to display the device interface and allow the user to select their options without acquiring an image. | |
EndorserNumber | Gets or sets the starting endorser / imprinter number. | |
ExposureTime | Gets or sets the exposure time used to capture the image in seconds. | |
FileFormat | Gets or sets the file format used when saving the acquired image directly to a file. | |
FileSystem | Gets the FileSystem for the device if supported. The FileSystem is used for navigating through the folders and files of some cameras and scanners. | |
Filter | Gets or sets the algorithm used to improve the quality of the image. | |
FlashUsed | Gets or sets the type of flash, if any, is used. | |
FlipRotation | Gets or sets a value which is used to properly orient images that flip orientation every other image.
| |
Frame | Gets or sets the rectangular area of the scanning bed to acquire. If you know ahead of time the location and size of the object to scan, and the device supports this feature, you can decrease the amount of scanning time by setting this property. | |
FrameSize | Gets or sets the static frame size for the acquire. | |
Gamma | Gets or sets the Source gamma correction value for the image data. | |
Halftone | Gets or sets the halftone used by the device during the acquisition. | |
HideInterface | Gets or sets a value indicating whether the device interface is shown when acquiring. | |
Highlight | Gets or sets which value in an image should be interpreted as the lightest highlight. | |
IccProfile | Gets or sets the ICAP_ICCPROFILE capability which determines if the device will link or
embed an ICC profile with the image. | |
Identity | Gets the device identity information. | |
ImageCount | Gets the number of available images. This is only valid for devices which contain an internal buffer. You can find out if there are any pending images during an acquisition by checking the PendingImages property of the AcquireEventArgs class. | |
ImageLayout | Gets or sets the layout used when acquiring image data. | |
InterfaceControllable | Gets a value indicating if the interface can be hidden during an acquire. If supported, you can hide the
interface by setting the hideInterface parameter of the Acquire() method.
| |
JobControl | Gets or sets the type of batch acquisition job to perform. | |
JpegPixelType | Gets or sets the pixel type used when Jpeg data is acquired. | |
JpegQuality | Gets or sets the Jpeg quality used during a file or memory transfer. | |
LampState | Gets or sets a value indicating if the lamp is currently, or should be to ON. | |
Language | Gets or sets the language to use for the source device. | |
LastReturnCode | Gets the last TwainReturnCode from getting or setting a property. | |
LightPath | Gets or sets a value which describes whether the image was captured transmissively or reflectively.
| |
LightSource | Gets or sets a value that describes the general color characteristic of the light source used to acquire
the image. | |
MaxBatchBuffers | Gets or sets the number of pages that the scanner can buffer when AutoScan is
enabled. | |
MaxFrames | Gets or sets the maximum number of frames the device or application can accept. | |
MicrEnabled | Gets or sets the CAP_MICRENABLED capability which indicates if the scanner is enabled for
MICR check scanning. | |
MinimumHeight | Gets the minimum height the source can acquire in Units. | |
MinimumWidth | Gets the minimum width the source can acquire in Units. | |
ModalAcquire | Gets or sets a value indicating whether the Acquire() method is synchronous or
asynchronous. | |
NativeResolution | Gets the native optical resolution of the device. | |
NoiseFilter | Gets or sets the noise filter the source will use. | |
Online | Gets a value indicating if the device is powered up and ready to use. | |
Orientation | Gets or sets the orientation of the acquired image. | |
Overscan | Gets or sets a value indicating the type of overscan the source should perform. | |
PaperDetectable | Gets a value indicating if the device has a paper sensor. | |
PatchCode | Gets the TwainBarCode object used to control patchcode features of the device. | |
PhysicalHeight | Gets the maximum height in Units the source can acquire. | |
PhysicalWidth | Gets the maximum width in Units the source can acquire. | |
PixelFlavor | Gets or sets a value indicating whether the image data uses the value 0 for the darkest color or the
lightest color. | |
PixelType | Gets or sets the pixel format to acquire. You should set this property before setting BitDepth. | |
PowerSupply | Gets the type of power supply used for this camera. | |
ReacquireAllowed | Gets a value indicating whether the physical hardware is capable of acquiring multiple images of the same
page without changes to the physical registration of that page. | |
Resolution | Gets or sets the number of pixels per unit as specified by the Units property. | |
Rotation | Gets or sets the amount to rotate the image by the Source. | |
Scaling | Gets or sets the amount of scaling the Source will perform on the image. | |
SerialNumber | Gets a string containing the serial number of this device. | |
Shadow | Gets or sets the value in an image which should be interpreted as the darkest shadow. | |
State | Gets a value indicating the current Twain state. | |
ThreadingEnabled | Gets or sets a value indicating whether to perform the scanning in a separate thread. See the remarks
below for threading limitations. | |
Threshold | Gets or sets the dividing line between black and white for 1-bit acquires. | |
ThumbnailEnabled | Gets or sets a value indicating if a thumbnail should be returned instead of the full size image.
| |
TransferCount | Gets or sets the number of images your application is willing to accept. | |
TransferMethod | Gets or sets the transfer method used when acquiring data. | |
Units | Gets or sets a value indicating the units of measure for this acquire. | |
ZoomFactor | Gets or sets the zoom factor to use for the acquire. Valid values for this property are source defined. |
Name | Description | |
---|---|---|
Acquire | Acquires an image from this device. | |
CanOpen | Obsolete. | |
ClearBuffers | This lets you choose how the device should handle its buffer clearing procedure. | |
Close | Closes the connection with the device previously opened. Calling this method when an image is being acquired will cancel the acquisition and any pending transfers. If you want to close the connection after all images have been transferred, you should do so in the AcquireFinished event. | |
Disable | This method will disable and hide the device interface. This only needs to be called if the Enable() method is used to display the interface or invoke scanning. | |
Dispose | Releases resources used by the device when created from the CreateDeviceSession(String)
method. This should not be used for Device objects in the DeviceCollection. | |
Enable | This method can be used to display the device interface and invoke an acquisition instead of using Acquire(). | |
EnableCamera | Use this method to enable or disable cameras used when scanning. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Calls Close() (Overrides Object.Finalize().) | |
GetConditionCode | Returns the condition code from the last Twain operation. This can provide more information about a
failure when getting or setting a Device property. | |
GetFrames | Returns an array containing the current frames set for a device. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetQueryOperations | Returns the operations supported for a specific capability. | |
GetSupportedBarCodes | Returns the barcodes supported by the device. | |
GetSupportedBitDepthReductionModes | Returns the BitDepthReductionModes supported by the device. | |
GetSupportedBitDepths | Returns the supported bit depth values for the current PixelType. | |
GetSupportedBrightnessValues | Returns the brightness values supported by the device. | |
GetSupportedCapabilities | Returns a list of all the capabilities for which the Source will answer inquiries. | |
GetSupportedCompressionModes | Returns the supported compression modes for this device. | |
GetSupportedContrastValues | Returns the contrast values supported by the device. | |
GetSupportedExposureTimes | Returns an array of exposure times supported by the device. | |
GetSupportedExtendedCapabilities | Returns the extended capabilities supported by the device. | |
GetSupportedFlashModes | Returns the flash modes supported by the device. | |
GetSupportedFrameSizes | Returns the frame sizes supported by the device. | |
GetSupportedHalftones | Returns the halftone values supported by the device. | |
GetSupportedHighlightValues | Returns the highlight values supported by the device. | |
GetSupportedIccProfileOptions | Returns an array of TwainIccProfileOption values indicating what type of ICC profiles are
supported by the device. | |
GetSupportedImageFilters | Returns the image filters supported by the device. | |
GetSupportedImageFormats | Returns a list of the file formats supported by this device. | |
GetSupportedJobControls | Returns the job controls supported by the device. | |
GetSupportedJpegPixelTypes | Returns the Jpeg pixel types supported by the device. | |
GetSupportedJpegQualityValues | Returns the Jpeg quality values supported by the device. | |
GetSupportedLanguageTypes | Returns the language types supported by the device. | |
GetSupportedLightPathModes | Returns the light path modes supported by the device. | |
GetSupportedLightSourceModes | Returns the light source modes supported by the device. | |
GetSupportedMaxBatchBuffers | Returns the supported maximum batch buffers for the device. | |
GetSupportedNativeResolutions | Returns the native resolution values for the device. | |
GetSupportedNoiseFilterModes | Returns the noise filter modes supported by the device. | |
GetSupportedOrientationModes | Returns the orientation modes supported by the device. | |
GetSupportedOverscanModes | Returns the overscan modes supported by the device. | |
GetSupportedPatchCodes | Returns the patchcodes supported by the device. | |
GetSupportedPixelTypes | Returns the pixel types supported by the device. | |
GetSupportedPowerSupplies | Returns the supported power supplies for the device. | |
GetSupportedPrinterModes | Returns the printer modes supported by the device. | |
GetSupportedPrinters | Finds the type of imprinter or endorser supported by this device. These can be used to set which
imprinter or endorser to use in the SetImprinterEndorser() method. | |
GetSupportedResolutions | Returns supported resolution values for the device. | |
GetSupportedRotations | Returns the rotations supported by the device. | |
GetSupportedScalingValues | Returns scaling values supported by the device. | |
GetSupportedShadowValues | Returns the shadow values supported by the device. | |
GetSupportedThresholdValues | Returns the threshold values supported by the device. | |
GetSupportedTransferMethods | Returns the transfer methods supported by the device. | |
GetSupportedUnitTypes | Returns the unit values supported by the device. | |
GetSupportedZoomFactors | Returns an array of valid zoom factors for this device. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
LoadParameters | Loads previously saved device parameters into the device. | |
LoadXmlParameters | Load device parameter data saved with the SaveXmlParameters(Stream) method. | |
Open | Opens a connection to this device. You must open a connection to the device before getting or setting any device properties. If you don't need to get or set any properties, you can call the Acquire() method without using the Open or Close() methods. TryOpen() is the preferred way to open a connection to the device. | |
PreFilterMessage | Filters out a message before it is dispatched. | |
QueryCapability | Determines if a capability is available from the device. It's unlikely that any one device supports all of the properties and features. You can use this method to find out if a property is get-able and/or set-able. This can also be used to help determine if the device is a camera by checking for camera specific properties, such as FlashUsed or BatteryPercentage. | |
SaveParameters | Saves the current device parameters to a stream. | |
SaveXmlParameters | Saves device property values into XML format. | |
SetCameraPixelOrder | Sets the pixel order for each enabled camera. | |
SetExtendedCapabilities | Sets the extended capabilities your application needs to negotiate during states 5 and 6 of a Twain
session. | |
SetExtendedImageInfoOptions | Sets the extended image information options to obtain after acquiring the data. | |
SetFrames | Sets multiple frames to acquire from when scanning. | |
SetImageDataset | Sets the indices of the images you want to acquire. This is useful when you want to acquire multiple images from a camera with a single call to the Acquire() method. | |
SetImprinterEndorser(ImprinterEndorserType, Boolean) | Use this method to enable or disable an imprinter or endorser. | |
SetImprinterEndorser(ImprinterEndorserType, ImprinterEndorserMode, String, Int32, String) | Use this method to enable an imprinter or endorser and set its parameters. | |
ShowUserInterface | Displays the device interface. This operation is used by applications that wish to display the device user interface to allow the user to manipulate the devices current settings for resolution, paper size, etc. but not acquire an image. | |
StartAutomaticCapture | Starts an automatic capture process. This method does not acquire the images. Automatic capture implies that the device is capable of capturing images without the presence of the Application. This means that it must be possible for the Application to close the device and reopen it later, after the images have been captured. | |
ToString | A string which describes this object. (Overrides Object.ToString().) | |
TryOpen |
This class controls how the image will be acquired and to learn more about the device and its capabilities. The Open() method must be invoked before gaining access to the device properties and information. The Close() method must be invoked when finished with the device.
To find out which properties you can obtain from the device, invoke the QueryCapability(DeviceCapability, Boolean) method or get a list of property names from the GetSupportedCapabilities() method.