Click or drag to resize
CanvasVirtualBitmapLoadAsync Method (ICanvasResourceCreator, IRandomAccessStream, CanvasVirtualBitmapOptions, CanvasAlphaMode)
Loads a virtual bitmap from a stream.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static IAsyncOperation<CanvasVirtualBitmap> LoadAsync(
	ICanvasResourceCreator resourceCreator,
	IRandomAccessStream stream,
	CanvasVirtualBitmapOptions options,
	CanvasAlphaMode alpha
)

Parameters

resourceCreator
Type: Microsoft.Graphics.CanvasICanvasResourceCreator
stream
Type: Windows.Storage.StreamsIRandomAccessStream
options
Type: Microsoft.Graphics.CanvasCanvasVirtualBitmapOptions
alpha
Type: Microsoft.Graphics.CanvasCanvasAlphaMode

Return Value

Type: IAsyncOperationCanvasVirtualBitmap
Remarks

The default options is None.

The default alpha value is Premultiplied.

Unless ReleaseSource is specified, the CanvasVirtualBitmap will retain a reference to the stream.

When loading a JpegXR format bitmap that contains high dynamic range (HDR) pixel data, the loaded bitmap may use one of the pixel formats:

  • DirectXPixelFormat.R16G16B16A16Float
  • DirectXPixelFormat.R32G32B32A32Float
  • DirectXPixelFormat.R16G16B16A16UIntNormalized

For all other file formats, or when the current device does not support high dynamic range pixel formats (as reported by IsPixelFormatSupported(DirectXPixelFormat)), the loaded bitmap will use DirectXPixelFormat.B8G8R8A8UIntNormalized.

See Also