ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / TWAIN functions
  • Specific properties
  • Operating mode in the 64-bit applications
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Allows you to get or change the properties of the current Twain device. This Twain device can be selected by TwainSelectSource.
Example
// Connaître la résolution du scanner
nRésolution is int = TwainProperty(TwainResolution)
// Modifier la résolution pour scanner en 200 dpi
bAppliquer is boolean = TwainProperty(TwainResolution, 200)
Syntax

Finding out the properties of the current Twain device Hide the details

<Result> = TwainProperty(<Property>)
<Result>: Integer
  • Value of the specified property.
  • 0 if the TWAIN device does not support the modification of the requested property or the value of the requested property.
<Property>: Integer constant
Property for which to get the values. This property corresponds to one of the following constants:
TwainBitsByPixelNumber of bits per pixel.
TwainBrightnessBrightness of the device.
<Value> must be included between -1000 and 1000.
TwainFeederEnabledManagement mode of feeder. <Result> is set to:
  • True if the feeder is enabled,
  • False otherwise.
TwainContrastContrast of the Twain device. <Result> will be included between -1000 and 1000.
TwainBorderDetectionEnabledDetection mode of borders. <Result> is set to:
  • True if the detection of borders is enabled,
  • False otherwise.
TwainBarCodeDetectionEnabledDetection mode of bar codes. <Result> is set to:
  • True if the detection of bar codes is enabled,
  • False otherwise.
TwainHeightMaximum height (in millimeters).
TwainInterfaceControllableManagement mode of user interface. <Result> is set to:
  • True if the user interface can be disabled,
  • False otherwise.
TwainWidthMaximum width (in millimeters)
TwainReadyStatus of the device. <Result> is set to:
  • True if the device is plugged in and ready,
  • False otherwise.
TwainDuplexSupport for double side. <Result> is set to:
  • True if the device supports the double side,
  • False otherwise.
TwainDuplexEnabledManagement mode of double side. <Result> is set to:
  • True if the double side is enabled,
  • False otherwise.
TwainAutoResizeEnabledManagement mode of automatic resize. <Result> is set to:
  • True if the automatic resize of images is enabled,
  • False otherwise.
TwainAutoDeskewEnabledManagement mode of automatic image deskew. <Result> is set to:
  • True if the automatic deskew of images is enabled,
  • False otherwise.
TwainResolutionResolution in pixels per inch.
TwainAutoRotationEnabledManagement mode of image rotation. <Result> is set to:
  • True if the automatic image rotation is enabled,
  • False otherwise.
TwainBlankPageSkipEnabledManagement mode of blank pages. <Result> is set to:
  • True if the blank pages are skipped,
  • False otherwise.
TwainTypeType of supported images. <Result> is set to:
  • TwainPalette Manages color images from a palette (1, 4 or 8 bits per pixel).
  • TwainRGB Handles RGB images (24 bits per pixel).
  • TwainNiveauGris: Manages grayscale images.
  • TwainBlackWhite: Handles black and white images.

Modifying the properties of the current Twain device Hide the details

<Result> = TwainProperty(<Property> , <Value>)
<Result>: Boolean
  • True if the property was modified,
  • False otherwise
<Property>: Integer constant
Property whose value is to be changed. This property corresponds to one of the following constants:
TwainBitsByPixelNumber of bits per pixel.
TwainBrightnessDevice brightness: <Valeur> will be between -1000 and 1000.
TwainFeederEnabledManagement mode of feeder. <Value> is set to:
  • True if the feeder must be enabled,
  • False otherwise.
TwainContrastContrast of the Twain device. <Value> will be included between -1000 and 1000.
TwainBorderDetectionEnabledDetection mode of borders. <Value> is set to:
  • True if the detection of borders must be enabled,
  • False otherwise.
TwainBarCodeDetectionEnabledDetection mode of bar codes. <Result> is set to:
  • True if the detection of bar codes must be enabled,
  • False otherwise.
TwainDuplexEnabledManagement mode of double side. <Value> is set to:
  • True to enable the double side,
  • False otherwise.
TwainAutoResizeEnabledManagement mode of automatic resize. <Value> is set to:
  • True if the automatic resize of images must be enabled,
  • False otherwise.
TwainAutoDeskewEnabledManagement mode of automatic image deskew. <Value> is set to:
  • True if the automatic image deskew must be enabled,
  • False otherwise.
TwainResolutionResolution in pixels per inch.
TwainAutoRotationEnabledManagement mode of image rotation. <Value> is set to:
  • True if the automatic image rotation must be enabled,
  • False otherwise.
TwainBlankPageSkipEnabledManagement mode of blank pages. <Value> is set to:
  • True if the blank pages must be skipped,
  • False otherwise.
TwainTypeType of supported images. <Value> corresponds to the following constant or combination of constants:
  • TwainPalette Manages color images from a palette (1, 4 or 8 bits per pixel).
  • TwainRGB Handles RGB images (24 bits per pixel).
  • TwainNiveauGris: Manages grayscale images.
  • TwainBlackWhite: Handles black and white images.
<Value>: Integer
New value for the requested property.
Remarks

Specific properties

You have the ability to retrieve or modify the value of a property not listed in the above-mentioned Twain constants. In this case, the <Property> parameter will correspond to the value of the CAP_xxx or ICAP_xxx constant of TWAIN.H, associated with the requested property.

Operating mode in the 64-bit applications

In a 64-bit application, this function will automatically use the 64-bit Twain driver. The TWAIN cannot be used if this driver is not installed.
Component: wd300std.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
An addendum to the very important Help DPI
Dear,

An addendum to the very important Help:

So it comes in lower resolution 96 dpi Scanner
nResolution is int = TwainProperty (TwainResolution)

So you can set the scanner will digiltalizar at 200 dpi
nResolution is int = TwainProperty (TwainResolution, 200)

OK
adrianoboller
18 Apr. 2016

Last update: 03/27/2025

Send a report | Local help