ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration ImageScannerFlatbedConfiguration Class

Represents the Flatbed scan source of the scanner.

Syntax

Declaration

public sealed class ImageScannerFlatbedConfigurationpublic sealed class ImageScannerFlatbedConfigurationPublic NotInheritable Class ImageScannerFlatbedConfigurationpublic sealed class ImageScannerFlatbedConfiguration

Remarks

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

Properties summary

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

Gets or sets the automatic crop mode.

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.

Gets the step size at which the brightness levels of the data source can be increased or decreased between the minimum and maximum values.

Gets or sets the color mode for the Flatbed scanner.

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.

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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.

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

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.

Methods summary

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

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

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

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 ImageScannerResolutionpublic ImageScannerResolution ActualResolution { get; }

    Property Value

  • 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 ImageScannerAutoCroppingModepublic ImageScannerAutoCroppingMode AutoCroppingMode { get; set; }

    Property Value

    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 intpublic int Brightness { get; set; }

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

    Property Value

    • uint
      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 ImageScannerColorModepublic ImageScannerColorMode ColorMode { get; set; }

    Property Value

    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 intpublic int Contrast { get; set; }

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

    Property Value

    • uint
      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 intpublic int DefaultBrightness { get; }

    Property 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 ImageScannerColorModepublic ImageScannerColorMode DefaultColorMode { get; }

    Property Value

    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 intpublic int DefaultContrast { get; }

    Property 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 ImageScannerFormatpublic ImageScannerFormat DefaultFormat { get; }

    Property Value

    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 ImageScannerResolutionpublic ImageScannerResolution DesiredResolution { get; set; }

    Property Value

    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 ImageScannerFormatpublic ImageScannerFormat Format { get; set; }

    Property Value

    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 intpublic int MaxBrightness { get; }

    Property 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 intpublic int MaxContrast { get; }

    Property 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 ImageScannerResolutionpublic ImageScannerResolution MaxResolution { get; }

    Property Value

    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 Sizepublic Size MaxScanArea { get; }

    Property Value

  • 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 intpublic int MinBrightness { get; }

    Property 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 intpublic int MinContrast { get; }

    Property 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 ImageScannerResolutionpublic ImageScannerResolution MinResolution { get; }

    Property Value

  • 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 Sizepublic Size MinScanArea { get; }

    Property Value

  • 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 ImageScannerResolutionpublic ImageScannerResolution OpticalResolution { get; }

    Property Value

    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 Rectpublic Rect SelectedScanRegion { get; set; }

    Property Value

    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 bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)public bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)Public Function IsAutoCroppingModeSupported(value As ImageScannerAutoCroppingMode) As boolpublic bool IsAutoCroppingModeSupported(ImageScannerAutoCroppingMode value)

    Parameters

    Returns

    • bool
      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 bool IsColorModeSupported(ImageScannerColorMode value)public bool IsColorModeSupported(ImageScannerColorMode value)Public Function IsColorModeSupported(value As ImageScannerColorMode) As boolpublic bool IsColorModeSupported(ImageScannerColorMode value)

    Parameters

    Returns

    • bool
      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 bool IsFormatSupported(ImageScannerFormat value)public bool IsFormatSupported(ImageScannerFormat value)Public Function IsFormatSupported(value As ImageScannerFormat) As boolpublic bool IsFormatSupported(ImageScannerFormat value)

    Parameters

    Returns

    • bool
      bool
      bool
      bool

      Indicates whether the specified file type is supported.

Device family

Windows Desktop Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Devices.Scanners.ScannerDeviceContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Devices.Scanners.dll