CanvasBitmapCreateFromSoftwareBitmap Method |
Namespace: Microsoft.Graphics.Canvas
public static CanvasBitmap CreateFromSoftwareBitmap( ICanvasResourceCreator resourceCreator, SoftwareBitmap sourceBitmap )
The CanvasBitmap's Format is determined from the SoftwareBitmap's BitmapPixelFormat property. Not all BitmapPixelFormats are supported by CanvasBitmap. See Pixel Formats for more details.
The following table shows how each BitmapPixelFormat is interpreted:
sourceBitmap's BitmapPixelFormat | CanvasBitmap's Format |
---|---|
BitmapPixelFormat.Unknown | unsupported |
BitmapPixelFormat.Rgba16 | DirectXPixelFormat.R16G16B16A16UIntNormalized |
BitmapPixelFormat.Rgba8 | DirectXPixelFormat.R8G8B8A8UIntNormalized |
BitmapPixelFormat.Gray16 | unsupported |
BitmapPixelFormat.Gray8 | DirectXPixelFormat.A8UIntNormalized |
BitmapPixelFormat.Bgra8 | DirectXPixelFormat.B8G8R8A8UIntNormalized |
BitmapPixelFormat.Nv12 | unsupported |
BitmapPixelFormat.Yuy2 | unsupported |