Image​Scanner​Flatbed​Configuration Image​Scanner​Flatbed​Configuration Image​Scanner​Flatbed​Configuration Class

Definition

Represents the Flatbed scan source of the scanner.

public sealed class ImageScannerFlatbedConfiguration : IImageScannerFormatConfiguration, IImageScannerSourceConfigurationpublic sealed class ImageScannerFlatbedConfiguration : IImageScannerFormatConfiguration, IImageScannerSourceConfigurationPublic NotInheritable Class ImageScannerFlatbedConfiguration Implements IImageScannerFormatConfiguration, IImageScannerSourceConfiguration
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Scanners.ScannerDeviceContract (introduced v1)

Remarks

This runtime class implements the IImageScannerSourceConfiguration interface and the IImageScannerFormatConfiguration interface.

Properties

ActualResolution ActualResolution ActualResolution

Gets the actual horizontal and vertical scan resolution for the Flatbed scanner, in DPI.

public ImageScannerResolution ActualResolution { get; }public ImageScannerResolution ActualResolution { get; }Public ReadOnly Property ActualResolution As ImageScannerResolution
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical resolution, in pixels.

Attributes

AutoCroppingMode AutoCroppingMode AutoCroppingMode

Gets or sets the automatic crop mode.

public ImageScannerAutoCroppingMode AutoCroppingMode { get; set; }public ImageScannerAutoCroppingMode AutoCroppingMode { get; set; }Public ReadWrite Property AutoCroppingMode As ImageScannerAutoCroppingMode
Attributes

Remarks

When automatic detection is enabled on the scanner's Flatbed, the automatic crop mode indicates whether to scan one region or multiple regions. When a new scan session starts, the default value is Disabled.

Brightness Brightness Brightness

Gets or sets the current brightness level for capturing image data from the scanner's Flatbed. At the beginning of a new scan session, this property is set to the DefaultBrightness property.

public int Brightness { get; set; }public int Brightness { get; set; }Public ReadWrite Property Brightness As int
Value
int int int

The current brightness level.

Attributes

Remarks

Your app can set the value of this property to any Int32 value between the MinBrightness and MaxBrightness values, and also relates to the BrightnessStep value with this equation:

Brightness = MinBrightness + (N * BrightnessStep)

where N is a positive integer smaller than or equal to (MaxBrightness - MinBrightness) / BrightnessStep.

The app can return the brightness level to default by setting the value of this property to DefaultBrightness.

If the scanner doesn't allow brightness adjustments, MinBrightness, MaxBrightness and DefaultBrightness are set to the same value-oftentimes 0, the BrightnessStep value is 0, and the app can't set the Brightness property to a value other than DefaultBrightness.

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 uint BrightnessStep { get; }public uint BrightnessStep { get; }Public ReadOnly Property BrightnessStep As uint
Value
uint uint uint

The step size to increment or decrement. A typical value is 1.

Attributes

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

Gets or sets the color mode for the Flatbed scanner.

public ImageScannerColorMode ColorMode { get; set; }public ImageScannerColorMode ColorMode { get; set; }Public ReadWrite Property ColorMode As ImageScannerColorMode
Attributes

Remarks

When a new scan session starts, this property is the same as the DefaultColorMode property.

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
Value
int int int

The contrast level.

Attributes

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

Gets the step size at which the contrast levels of the data source can increase or decrease between the minimum and maximum values.

public uint ContrastStep { get; }public uint ContrastStep { get; }Public ReadOnly Property ContrastStep As uint
Value
uint uint uint

The step size to increment or decrement. The typical value is 1.

Attributes

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

Gets the default brightness level for the scanner's Flatbed.

public int DefaultBrightness { get; }public int DefaultBrightness { get; }Public ReadOnly Property DefaultBrightness As int
Value
int int int

The default brightness level for the scanner.

Attributes

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

Gets the default color mode for the scanner's Flatbed.

public ImageScannerColorMode DefaultColorMode { get; }public ImageScannerColorMode DefaultColorMode { get; }Public ReadOnly Property DefaultColorMode As ImageScannerColorMode
Attributes

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 is the order of priority:

  • 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

Gets the default contrast level for the scanner's Flatbed.

public int DefaultContrast { get; }public int DefaultContrast { get; }Public ReadOnly Property DefaultContrast As int
Value
int int int

The default contrast level.

Attributes

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.

DefaultFormat DefaultFormat DefaultFormat

Gets the default file format for the scanner's Flatbed at the beginning of a new scan session.

public ImageScannerFormat DefaultFormat { get; }public ImageScannerFormat DefaultFormat { get; }Public ReadOnly Property DefaultFormat As ImageScannerFormat
Attributes

Remarks

All WIA scanner devices support the Windows Device Independent Bitmap (DIB) format.

By default, these values in this order will be selected based on the file formats the device supports, from the smallest file size (in bytes) to the largest size:

    1. Jpeg
    1. Png
    1. Bitmap

DesiredResolution DesiredResolution DesiredResolution

Gets or sets the horizontal and vertical scan resolution for the scanner's Flatbed that the app requests, in DPI.

public ImageScannerResolution DesiredResolution { get; set; }public ImageScannerResolution DesiredResolution { get; set; }Public ReadWrite Property DesiredResolution As ImageScannerResolution
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical resolution, in pixels.

Attributes

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.

Format Format Format

Gets or sets the current file transfer format for image data acquisition from the scanner's Flatbed to the client app.

public ImageScannerFormat Format { get; set; }public ImageScannerFormat Format { get; set; }Public ReadWrite Property Format As ImageScannerFormat
Attributes

Remarks

When a new scan session starts, this property is set to the default file format. See the DefaultFormat property on how this is done.

MaxBrightness MaxBrightness MaxBrightness

Gets the maximum brightness level supported by the scanner's Flatbed.

public int MaxBrightness { get; }public int MaxBrightness { get; }Public ReadOnly Property MaxBrightness As int
Value
int int int

The maximum brightness level, typically 1000.

Attributes

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

Gets the maximum contrast level supported by the scanner's Flatbed.

public int MaxContrast { get; }public int MaxContrast { get; }Public ReadOnly Property MaxContrast As int
Value
int int int

The maximum contrast level, typically 1000.

Attributes

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

Gets the maximum horizontal and vertical scan resolution of the scanner's Flatbed in DPI.

public ImageScannerResolution MaxResolution { get; }public ImageScannerResolution MaxResolution { get; }Public ReadOnly Property MaxResolution As ImageScannerResolution
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical resolution, in pixels.

Attributes

Remarks

Apps can scan at MaxResolution in a small area at the highest possible resolution.

MaxScanArea MaxScanArea MaxScanArea

Gets the maximum scan area dimensions in inches. The maximum scan width is the widest a document can be in order for the scanner's Flatbed to scan it.

public Size MaxScanArea { get; }public Size MaxScanArea { get; }Public ReadOnly Property MaxScanArea As Size
Value
Size Size Size

The width and height of the area.

Attributes

MinBrightness MinBrightness MinBrightness

Gets the minimum brightness level supported by the scanner's Flatbed.

public int MinBrightness { get; }public int MinBrightness { get; }Public ReadOnly Property MinBrightness As int
Value
int int int

The minimum brightness level, typically -1000.

Attributes

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

Gets the minimum contrast level supported by the scanner's Flatbed.

public int MinContrast { get; }public int MinContrast { get; }Public ReadOnly Property MinContrast As int
Value
int int int

The minimum contrast level, typically -1000.

Attributes

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

Gets the minimum horizontal and vertical scan resolution of the scanner's Flatbed in DPI.

public ImageScannerResolution MinResolution { get; }public ImageScannerResolution MinResolution { get; }Public ReadOnly Property MinResolution As ImageScannerResolution
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical resolution, in pixels.

Attributes

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 to scan it.

public Size MinScanArea { get; }public Size MinScanArea { get; }Public ReadOnly Property MinScanArea As Size
Value
Size Size Size

The width and height of the area.

Attributes

OpticalResolution OpticalResolution OpticalResolution

Gets the optical scan resolution of the Flatbed scanner in DPI.

public ImageScannerResolution OpticalResolution { get; }public ImageScannerResolution OpticalResolution { get; }Public ReadOnly Property OpticalResolution As ImageScannerResolution
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical scan resolution in pixels.

Attributes

Remarks

Apps can scan at OpticalResolution for the best quality per pixel that the hardware device is capable of.

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 Disabled.

public Rect SelectedScanRegion { get; set; }public Rect SelectedScanRegion { get; set; }Public ReadWrite Property SelectedScanRegion As Rect
Value
Rect Rect Rect

The location and size of a rectangle.

Attributes

Remarks

This table describes the property's restrictions. Default values are set at the beginning of a new scan session.

NameDefault valueValid Flatbed valuesValid Feeder values
SelectedScanRegion.X0between 0 and MaximumScanArea.Width - 1between 0 and PageSizeDimenstions.Width
SelectedScanRegion.Y0between 0 and MaximumScanArea.Height - 1between 0 and PageSizeDimenstions.Height
SelectedScanRegion.WidthMaximumScanArea.Widthbetween MinimumScanArea.Width and (MaximumScanArea.Width – SelectedScanRegion.X)between MinimumScanArea.Width and PageSizeDimensions.Width
SelectedScanRegion.HeightMaximumScanArea.Heightbetween MinimumScanAreaHeight and (MaximumScanAreaHeight – SelectedScanRegion.Y)between MinimumScanArea.Height and PageSizeDimensions.Height

Methods

IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode)

Returns whether the scanner's Flatbed supports the specified ImageScannerAutoCroppingMode.

public bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)public bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)Public Function IsAutoCroppingModeSupported(value As ImageScannerAutoCroppingMode) As bool
Parameters
Returns
bool bool bool

Indicates whether the device supports value mode.

Attributes

IsColorModeSupported(ImageScannerColorMode) IsColorModeSupported(ImageScannerColorMode) IsColorModeSupported(ImageScannerColorMode)

Returns whether the scanner's Flatbed can scan and transfer images in the specified color mode.

public bool IsColorModeSupported(ImageScannerColorMode value)public bool IsColorModeSupported(ImageScannerColorMode value)Public Function IsColorModeSupported(value As ImageScannerColorMode) As bool
Parameters
Returns
bool bool bool

Indicates whether the scanner can scan images in value mode.

Attributes

IsFormatSupported(ImageScannerFormat) IsFormatSupported(ImageScannerFormat) IsFormatSupported(ImageScannerFormat)

Determines whether the scanner's Flatbed supports the specified file format or not.

public bool IsFormatSupported(ImageScannerFormat value)public bool IsFormatSupported(ImageScannerFormat value)Public Function IsFormatSupported(value As ImageScannerFormat) As bool
Parameters
Returns
bool bool bool

Indicates whether the specified file type is supported.

Attributes