ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration Class

Definition

Represents the Flatbed scan source of the scanner.

public : sealed class ImageScannerFlatbedConfiguration : IImageScannerFormatConfiguration, IImageScannerSourceConfiguration
public sealed class ImageScannerFlatbedConfiguration : IImageScannerFormatConfiguration, IImageScannerSourceConfiguration
Public NotInheritable Class ImageScannerFlatbedConfiguration Implements IImageScannerFormatConfiguration, IImageScannerSourceConfiguration
// This class does not provide a public constructor.
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 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
var imageScannerResolution = imageScannerFlatbedConfiguration.actualResolution;
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution ImageScannerResolution

The horizontal and vertical resolution, in pixels.

AutoCroppingMode 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
var imageScannerAutoCroppingMode = imageScannerFlatbedConfiguration.autoCroppingMode;
imageScannerFlatbedConfiguration.autoCroppingMode = imageScannerAutoCroppingMode;

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 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
var int = imageScannerFlatbedConfiguration.brightness;
imageScannerFlatbedConfiguration.brightness = int;
Value
int int int int

The current brightness level.

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 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
var uint = imageScannerFlatbedConfiguration.brightnessStep;
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 Flatbed scanner.

public : ImageScannerColorMode ColorMode { get; set; }
public ImageScannerColorMode ColorMode { get; set; }
Public ReadWrite Property ColorMode As ImageScannerColorMode
var imageScannerColorMode = imageScannerFlatbedConfiguration.colorMode;
imageScannerFlatbedConfiguration.colorMode = imageScannerColorMode;

Remarks

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

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
var int = imageScannerFlatbedConfiguration.contrast;
imageScannerFlatbedConfiguration.contrast = int;
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
var uint = imageScannerFlatbedConfiguration.contrastStep;
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 scanner's Flatbed.

public : int DefaultBrightness { get; }
public int DefaultBrightness { get; }
Public ReadOnly Property DefaultBrightness As int
var int = imageScannerFlatbedConfiguration.defaultBrightness;
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 the scanner's Flatbed.

public : ImageScannerColorMode DefaultColorMode { get; }
public ImageScannerColorMode DefaultColorMode { get; }
Public ReadOnly Property DefaultColorMode As ImageScannerColorMode
var imageScannerColorMode = imageScannerFlatbedConfiguration.defaultColorMode;

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 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
var int = imageScannerFlatbedConfiguration.defaultContrast;
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.

DefaultFormat 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
var imageScannerFormat = imageScannerFlatbedConfiguration.defaultFormat;

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 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
var imageScannerResolution = imageScannerFlatbedConfiguration.desiredResolution;
imageScannerFlatbedConfiguration.desiredResolution = imageScannerResolution;
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution ImageScannerResolution

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.

Format 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
var imageScannerFormat = imageScannerFlatbedConfiguration.format;
imageScannerFlatbedConfiguration.format = imageScannerFormat;

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 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
var int = imageScannerFlatbedConfiguration.maxBrightness;
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 scanner's Flatbed.

public : int MaxContrast { get; }
public int MaxContrast { get; }
Public ReadOnly Property MaxContrast As int
var int = imageScannerFlatbedConfiguration.maxContrast;
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 scanner's Flatbed in DPI.

public : ImageScannerResolution MaxResolution { get; }
public ImageScannerResolution MaxResolution { get; }
Public ReadOnly Property MaxResolution As ImageScannerResolution
var imageScannerResolution = imageScannerFlatbedConfiguration.maxResolution;
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution ImageScannerResolution

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 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
var size = imageScannerFlatbedConfiguration.maxScanArea;
Value
Size Size Size Size

The width and height of the area.

MinBrightness 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
var int = imageScannerFlatbedConfiguration.minBrightness;
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 scanner's Flatbed.

public : int MinContrast { get; }
public int MinContrast { get; }
Public ReadOnly Property MinContrast As int
var int = imageScannerFlatbedConfiguration.minContrast;
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 scanner's Flatbed in DPI.

public : ImageScannerResolution MinResolution { get; }
public ImageScannerResolution MinResolution { get; }
Public ReadOnly Property MinResolution As ImageScannerResolution
var imageScannerResolution = imageScannerFlatbedConfiguration.minResolution;
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution ImageScannerResolution

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

public : Size MinScanArea { get; }
public Size MinScanArea { get; }
Public ReadOnly Property MinScanArea As Size
var size = imageScannerFlatbedConfiguration.minScanArea;
Value
Size Size Size Size

The width and height of the area.

OpticalResolution 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
var imageScannerResolution = imageScannerFlatbedConfiguration.opticalResolution;
Value
ImageScannerResolution ImageScannerResolution ImageScannerResolution ImageScannerResolution

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

public : Rect SelectedScanRegion { get; set; }
public Rect SelectedScanRegion { get; set; }
Public ReadWrite Property SelectedScanRegion As Rect
var rect = imageScannerFlatbedConfiguration.selectedScanRegion;
imageScannerFlatbedConfiguration.selectedScanRegion = rect;
Value
Rect Rect Rect Rect

The location and size of a rectangle.

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) IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode)

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

public : Platform::Boolean IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)
public bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)
Public Function IsAutoCroppingModeSupported(value As ImageScannerAutoCroppingMode) As bool
var bool = imageScannerFlatbedConfiguration.isAutoCroppingModeSupported(value);
Parameters
Returns
Platform::Boolean bool bool bool

Indicates whether the device supports value mode.

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

Returns whether the scanner's Flatbed 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
var bool = imageScannerFlatbedConfiguration.isColorModeSupported(value);
Parameters
Returns
Platform::Boolean bool bool bool

Indicates whether the scanner can scan images in value mode.

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

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

public : Platform::Boolean IsFormatSupported(ImageScannerFormat value)
public bool IsFormatSupported(ImageScannerFormat value)
Public Function IsFormatSupported(value As ImageScannerFormat) As bool
var bool = imageScannerFlatbedConfiguration.isFormatSupported(value);
Parameters
Returns
Platform::Boolean bool bool bool

Indicates whether the specified file type is supported.