ImageScanner.ScanPreviewToStreamAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.