Click or drag to resize
CanvasBitmapCreateFromBytes Method (ICanvasResourceCreator, Byte, Int32, Int32, DirectXPixelFormat, Single, CanvasAlphaMode)
Creates a CanvasBitmap from an array of bytes, using the specified pixel width/height, DPI and alpha behavior.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static CanvasBitmap CreateFromBytes(
	ICanvasResourceCreator resourceCreator,
	byte[] bytes,
	int widthInPixels,
	int heightInPixels,
	DirectXPixelFormat format,
	float dpi,
	CanvasAlphaMode alpha
)

Parameters

resourceCreator
Type: Microsoft.Graphics.CanvasICanvasResourceCreator
bytes
Type: SystemByte
widthInPixels
Type: SystemInt32
heightInPixels
Type: SystemInt32
format
Type: Windows.Graphics.DirectXDirectXPixelFormat
dpi
Type: SystemSingle
alpha
Type: Microsoft.Graphics.CanvasCanvasAlphaMode

Return Value

Type: CanvasBitmap
Remarks
See Also