Click or drag to resize
CanvasDeviceIsPixelFormatSupported Method
Checks whether the specified pixel format is supported on this device.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public bool IsPixelFormatSupported(
	DirectXPixelFormat pixelFormat
)

Parameters

pixelFormat
Type: Windows.Graphics.DirectXDirectXPixelFormat

Return Value

Type: Boolean
Remarks

This will vary depending on the Direct3D feature level of the device, and whether the device has hardware acceleration enabled.

Note that even when the A8UIntNormalized, R8UIntNormalized, or R8G8UIntNormalized formats pass the IsPixelFormatSupported test, these have limited functionality compared to other pixel formats. Bitmaps of these formats cannot be drawn directly (eg. via DrawImage). They can only be used as effect source images, plus A8UIntNormalized bitmaps and rendertargets can be used as opacity masks.

For more information, see Pixel Formats.

See Also