ImageScanner.ScanPreviewToStreamAsync Method

Definition

Scans one image from the specified scan source and applies the lowest scan resolution with the selected image file format.

public:
 virtual IAsyncOperation<ImageScannerPreviewResult ^> ^ ScanPreviewToStreamAsync(ImageScannerScanSource scanSource, IRandomAccessStream ^ targetStream) = ScanPreviewToStreamAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<ImageScannerPreviewResult> ScanPreviewToStreamAsync(ImageScannerScanSource const& scanSource, IRandomAccessStream const& targetStream);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<ImageScannerPreviewResult> ScanPreviewToStreamAsync(ImageScannerScanSource scanSource, IRandomAccessStream targetStream);
function scanPreviewToStreamAsync(scanSource, targetStream)
Public Function ScanPreviewToStreamAsync (scanSource As ImageScannerScanSource, targetStream As IRandomAccessStream) As IAsyncOperation(Of ImageScannerPreviewResult)

Parameters

scanSource
ImageScannerScanSource

The image scan source.

targetStream
IRandomAccessStream

The scanned image file.

Returns

The progress of the scan and the scanned file format.

Attributes

Remarks

Attempting to preview from a feeder that supports preview but is empty at the time will result in a successful completion of the async call. The app should check for the returned ImageScannerPreviewResult.Succeeded result before attempting to read data from the stream, especially when scanning from the feeder.

Applies to