IImageScannerSourceConfiguration
IImageScannerSourceConfiguration
IImageScannerSourceConfiguration
IImageScannerSourceConfiguration
Interface
Definition
Queries and configures scan settings that are common to both Flatbed and Feeder sources.
The scan settings are:
- Scan region coordinates
- Scan resolution
- Color mode
public : interface IImageScannerSourceConfigurationpublic interface IImageScannerSourceConfigurationPublic Interface IImageScannerSourceConfiguration// You can use this interface in JavaScript.
- Inheritance
-
IImageScannerFormatConfigurationIImageScannerFormatConfigurationIImageScannerFormatConfigurationIImageScannerFormatConfigurationIImageScannerSourceConfigurationIImageScannerSourceConfigurationIImageScannerSourceConfigurationIImageScannerSourceConfiguration
- Attributes
| Device family |
Windows Desktop Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Devices.Scanners.ScannerDeviceContract (introduced v1)
|
Inherited Members
Inherited properties
Inherited methods
Properties
ActualResolution ActualResolution ActualResolution ActualResolution
Gets the actual horizontal and vertical scan resolution for the scan source, in DPI.
public : ImageScannerResolution ActualResolution { get; }public ImageScannerResolution ActualResolution { get; }Public ReadOnly Property ActualResolution As ImageScannerResolution// You can use this property in JavaScript.
The horizontal and vertical resolution, in pixels.
AutoCroppingMode AutoCroppingMode AutoCroppingMode AutoCroppingMode
Gets or sets the automatic crop mode.
When automatic detection is enabled on the scan source, the automatic crop mode indicates whether to scan one region or multiple regions. When a new scan session starts, the default value is Disabled.
public : ImageScannerAutoCroppingMode AutoCroppingMode { get; set; }public ImageScannerAutoCroppingMode AutoCroppingMode { get; set; }Public ReadWrite Property AutoCroppingMode As ImageScannerAutoCroppingMode// You can use this property in JavaScript.
- Value
- ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode
The automatic crop mode for the scan.
Brightness Brightness Brightness Brightness
Configures the current brightness level for capturing image data from the scan source. On a new scan session, the value of this property is the DefaultBrightness property.
public : int Brightness { get; set; }public int Brightness { get; set; }Public ReadWrite Property Brightness As int// You can use this property in JavaScript.
- Value
- int int int int
The brightness level.
Remarks
This property's value must be between MinBrightness and MaxBrightness, and is related to BrightnessStep with this equation:
Brightness = MinBrightness + (N*BrightnessStep)
where N is a positive integer smaller than or equal to (MaxBrightness - MinBrightness) / BrightnessStep.
Your app can return the brightness level to default by setting the value of this property to the DefaultBrightness property value. If the scanner doesn't allow brightness changes, MinBrightness, MaxBrightness and DefaultBrightness are set to the same value-oftentimes 0, the BrightnessStep is set to 0, and the app can't change the Brightness property to a different value other than DefaultBrightness.
BrightnessStep BrightnessStep BrightnessStep BrightnessStep
Gets the step size at which the brightness levels of the data source can be increased or decreased between the minimum and maximum values.
public : unsigned int BrightnessStep { get; }public uint BrightnessStep { get; }Public ReadOnly Property BrightnessStep As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The step size to increment or decrement. A typical value is 1.
Remarks
If the scanner doesn't allow brightness changes, then the MinBrightness, MaxBrightness and DefaultBrightness are set to the same value-oftentimes 0, and the BrightnessStep is set to 0. Your app can determine if the scan source doesn't support brightness adjustments by reading the BrightnessStep value. If the value is greater than 0, the scan source supports brightness adjustments.
ColorMode ColorMode ColorMode ColorMode
Gets or sets the color mode for the scan source. When a new scan session starts, this property is the same as the DefaultColorMode property.
public : ImageScannerColorMode ColorMode { get; set; }public ImageScannerColorMode ColorMode { get; set; }Public ReadWrite Property ColorMode As ImageScannerColorMode// You can use this property in JavaScript.
The color mode.
Contrast Contrast Contrast Contrast
Sets or gets the current contrast level for capturing image data from the scan source. At the beginning of a new scan session this property is set to the DefaultContrast property.
public : int Contrast { get; set; }public int Contrast { get; set; }Public ReadWrite Property Contrast As int// You can use this property in JavaScript.
- Value
- int int int int
The contrast level.
Remarks
Your app can set the value of this property to any Int32 value between the MinContrast and MaxContrast values, and also relates to the ContrastStep value with this equation:
Contrast = MinContrast + (N * ContrastStep)
where N is a positive integer smaller than or equal to (MaxContrast - MinContrast) / ContrastStep.
The app can return the contrast level to default by setting the value of this property to DefaultContrast.
If the scanner doesn't allow contrast adjustments, MinContrast, MaxContrast and DefaultContrast are set to the same value-oftentimes 0, the ContrastStep value is 0, and the app can't set the Contrast property to a value other than DefaultContrast.
ContrastStep ContrastStep ContrastStep ContrastStep
Gets the step size at which the contrast levels of the data source can increase or decrease between the minimum and maximum values.
public : unsigned int ContrastStep { get; }public uint ContrastStep { get; }Public ReadOnly Property ContrastStep As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The step size to increment or decrement. The typical value is 1.
Remarks
If the scanner doesn't allow contrast changes, then the MinContrast, MaxContrast and DefaultContrast are set to the same value-oftentimes 0, and the ContrastStep value is set to 0. Your app can determine if the scan source doesn't support contrast adjustments by reading the ContrastStep value. If the value is greater than 0, then the scan source supports contrast adjustments.
DefaultBrightness DefaultBrightness DefaultBrightness DefaultBrightness
Gets the default brightness level for the scan source.
public : int DefaultBrightness { get; }public int DefaultBrightness { get; }Public ReadOnly Property DefaultBrightness As int// You can use this property in JavaScript.
- Value
- int int int int
The default brightness level for the scanner.
Remarks
A scan source that doesn't allow brightness adjustments can have MinBrightness, MaxBrightness and DefaultBrightness set to the same value-oftentimes 0, and the BrightnessStep value set to 0.
DefaultColorMode DefaultColorMode DefaultColorMode DefaultColorMode
Gets the default color mode for this scan source.
public : ImageScannerColorMode DefaultColorMode { get; }public ImageScannerColorMode DefaultColorMode { get; }Public ReadOnly Property DefaultColorMode As ImageScannerColorMode// You can use this property in JavaScript.
The color mode.
Remarks
When a new scan session begins, this property chooses the default color mode based on the pixel data types and bit depths that each scanner device supports. This order of priority is used:
- AutoColor
- Color
- Grayscale
- BlackAndWhite If the scanner device doesn't support any of the standard color modes, the current scan source will be considered unavailable and the app won’t be able to scan from there.
DefaultContrast DefaultContrast DefaultContrast DefaultContrast
Gets the default contrast level for the scan source.
public : int DefaultContrast { get; }public int DefaultContrast { get; }Public ReadOnly Property DefaultContrast As int// You can use this property in JavaScript.
- Value
- int int int int
The default contrast level.
Remarks
A scan source that doesn't allow contrast adjustments can have MinContrast, MaxContrast and DefaultContrast set to the same value-oftentimes 0, and the ContrastStep value set to 0.
DesiredResolution DesiredResolution DesiredResolution DesiredResolution
Gets or sets the horizontal and vertical scan resolution for the scan source that the app requests, in DPI.
public : ImageScannerResolution DesiredResolution { get; set; }public ImageScannerResolution DesiredResolution { get; set; }Public ReadWrite Property DesiredResolution As ImageScannerResolution// You can use this property in JavaScript.
The horizontal and vertical resolution, in pixels.
Remarks
This property value can be MinResolution, MaxResolution, or OpticalResolution. But, if your app sets this value to other resolutions, this property will choose the closest resolution values. See ActualResolution property.
MaxBrightness MaxBrightness MaxBrightness MaxBrightness
Gets the maximum brightness level supported by the scan source.
public : int MaxBrightness { get; }public int MaxBrightness { get; }Public ReadOnly Property MaxBrightness As int// You can use this property in JavaScript.
- Value
- int int int int
The maximum brightness level, typically 1000.
Remarks
This property's value must be greater than or equal to the value of the MinBrightness property. A scan source that doesn't allow brightness adjustments can have MinBrightness, MaxBrightness and DefaultBrightness set to the same value-oftentimes 0, and the BrightnessStep value set to 0.
MaxContrast MaxContrast MaxContrast MaxContrast
Gets the maximum contrast level supported by the scan source.
public : int MaxContrast { get; }public int MaxContrast { get; }Public ReadOnly Property MaxContrast As int// You can use this property in JavaScript.
- Value
- int int int int
The maximum contrast level, typically 1000.
Remarks
This property's value must be greater than or equal to the value of the MinContrast property. A scan source that doesn't allow contrast adjustments can have MinContrast, MaxContrast and DefaultContrast set to the same value-oftentimes 0, and the ContrastStep value set to 0.
MaxResolution MaxResolution MaxResolution MaxResolution
Gets the maximum horizontal and vertical scan resolution of the scan source in DPI.
public : ImageScannerResolution MaxResolution { get; }public ImageScannerResolution MaxResolution { get; }Public ReadOnly Property MaxResolution As ImageScannerResolution// You can use this property in JavaScript.
The horizontal and vertical resolution, in pixels.
Remarks
Apps can scan at MaxResolution in a small area at the highest possible resolution.
MaxScanArea MaxScanArea MaxScanArea MaxScanArea
Gets the maximum scan area dimensions in inches. The maximum scan width is the longest width a document can have in order for the Feeder and Flatbed to scan it.
public : Size MaxScanArea { get; }public Size MaxScanArea { get; }Public ReadOnly Property MaxScanArea As Size// You can use this property in JavaScript.
Remarks
For Feeder scan sources, there are restrictions for the maximum scan area:
- The currently selected page size, if page size auto-detection is not enabled.
- The dimensions of the selected page size, which becomes the new maximum dimensions of the permissible scan area. These limits are dictated by hardware for Feeder, Flatbed and other types of scan sources.
MinBrightness MinBrightness MinBrightness MinBrightness
Gets the minimum brightness level supported by the scan source.
public : int MinBrightness { get; }public int MinBrightness { get; }Public ReadOnly Property MinBrightness As int// You can use this property in JavaScript.
- Value
- int int int int
The minimum brightness level, typically -1000.
Remarks
This property's value must be smaller than or equal to the value of the MaxBrightness property. A scan source that doesn't allow brightness adjustments can have MinBrightness, MaxBrightness and DefaultBrightness set to the same value-oftentimes 0, and the BrightnessStep value set to 0.
MinContrast MinContrast MinContrast MinContrast
Gets the minimum contrast level supported by the scan source.
public : int MinContrast { get; }public int MinContrast { get; }Public ReadOnly Property MinContrast As int// You can use this property in JavaScript.
- Value
- int int int int
The minimum contrast level, typically -1000.
Remarks
This property's value must be smaller than or equal to the value of the MaxContrast property. A scan source that doesn't allow contrast adjustments can have MinContrast, MaxContrast and DefaultContrast set to the same value-oftentimes 0, and the ContrastStep value set to 0.
MinResolution MinResolution MinResolution MinResolution
Gets the minimum horizontal and vertical scan resolution of the scan source in DPI.
public : ImageScannerResolution MinResolution { get; }public ImageScannerResolution MinResolution { get; }Public ReadOnly Property MinResolution As ImageScannerResolution// You can use this property in JavaScript.
The horizontal and vertical resolution, in pixels.
MinScanArea MinScanArea MinScanArea MinScanArea
Gets the minimum scan area in inches. The minimum scan area is the smallest size a document can have in order for a Flatbed or Feeder to scan it.
public : Size MinScanArea { get; }public Size MinScanArea { get; }Public ReadOnly Property MinScanArea As Size// You can use this property in JavaScript.
OpticalResolution OpticalResolution OpticalResolution OpticalResolution
Gets the optical horizontal and vertical scan resolution of the scan source in DPI.
public : ImageScannerResolution OpticalResolution { get; }public ImageScannerResolution OpticalResolution { get; }Public ReadOnly Property OpticalResolution As ImageScannerResolution// You can use this property in JavaScript.
The horizontal and vertical scan resolution in pixels.
Remarks
Apps can scan at OpticalResolution for the best quality per pixel that the hardware device is capable of.
SelectedScanRegion SelectedScanRegion SelectedScanRegion SelectedScanRegion
Gets or sets the origin coordinates (horizontal and vertical) and dimensions (width and height) of the selected scan area, in inches. This property is ignored when the AutoCroppingMode property is not set to Disabled.
public : Rect SelectedScanRegion { get; set; }public Rect SelectedScanRegion { get; set; }Public ReadWrite Property SelectedScanRegion As Rect// You can use this property in JavaScript.
Remarks
This table describes the property's restrictions. Default values are set at the beginning of a new scan session.
| Name | Default value | Valid Flatbed values | Valid Feeder values |
|---|---|---|---|
| 0 | between 0 and - 1 | between 0 and | |
| 0 | between 0 and - 1 | between 0 and | |
| between and ( – ) | between and | ||
| between and ( – ) | between and |
Methods
IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode)
Determines if the scan source supports the specified ImageScannerAutoCroppingMode.
public : PlatForm::Boolean IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)public bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)Public Function IsAutoCroppingModeSupported(value As ImageScannerAutoCroppingMode) As bool// You can use this method in JavaScript.
- value
- ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode ImageScannerAutoCroppingMode
The auto crop mode of the image to scan.
True if the device supports the value mode; otherwise False.
IsColorModeSupported(ImageScannerColorMode) IsColorModeSupported(ImageScannerColorMode) IsColorModeSupported(ImageScannerColorMode) IsColorModeSupported(ImageScannerColorMode)
Determines if the scan source can scan and transfer images in the specified color mode.
public : PlatForm::Boolean IsColorModeSupported(ImageScannerColorMode value)public bool IsColorModeSupported(ImageScannerColorMode value)Public Function IsColorModeSupported(value As ImageScannerColorMode) As bool// You can use this method in JavaScript.
The color mode.
True if the scanner can scan images in value mode; otherwise False.