BarcodeScannerProviderConnection.CreateFrameReaderAsync Method

Definition

Overloads

CreateFrameReaderAsync()

Creates a new BarcodeScannerFrameReader instance.

CreateFrameReaderAsync(BitmapPixelFormat)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format when possible.

CreateFrameReaderAsync(BitmapPixelFormat, BitmapSize)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format and size when possible.

CreateFrameReaderAsync()

Creates a new BarcodeScannerFrameReader instance.

C#
[Windows.Foundation.Metadata.Overload("CreateFrameReaderAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync();

Returns

A new BarcodeScannerFrameReader instance that reads frames from this BarcodeScannerProviderConnection.

Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

CreateFrameReaderAsync(BitmapPixelFormat)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format when possible.

C#
[Windows.Foundation.Metadata.Overload("CreateFrameReaderWithFormatAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync(BitmapPixelFormat preferredFormat);

Parameters

preferredFormat
BitmapPixelFormat

The preferred image format as a BitmapPixelFormat.

Returns

A new BarcodeScannerFrameReader instance that reads frames from this BarcodeScannerProviderConnection.

Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

If the requested format cannot be returned by the camera, frames will be returned using a default supported format. To ensure that the returned frames conform to a particular format, check the Format property on the returned BarcodeScannerVideoFrame objects.

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100

CreateFrameReaderAsync(BitmapPixelFormat, BitmapSize)

Creates a new BarcodeScannerFrameReader instance that returns frames in the preferred format and size when possible.

C#
[Windows.Foundation.Metadata.Overload("CreateFrameReaderWithFormatAndSizeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync(BitmapPixelFormat preferredFormat, BitmapSize preferredSize);

Parameters

preferredFormat
BitmapPixelFormat

The preferred image format as a BitmapPixelFormat.

preferredSize
BitmapSize

The preferred frame size as a BitmapSize in pixels.

Returns

A new BarcodeScannerFrameReader instance that reads frames from this BarcodeScannerProviderConnection.

Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

If the requested format or size cannot be returned by the camera, frames will be returned using a default supported format and/or size. To ensure that the returned frames conform to a particular format or size, check the Format, Height and Width properties on the returned BarcodeScannerVideoFrame objects.

Applies to

WinRT Build 26100 and other versions
Product Versions
WinRT Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100