Click or drag to resize
CanvasBitmap.CreateFromBytes Method (ICanvasResourceCreator, IBuffer, Int32, Int32, DirectXPixelFormat, Single, CanvasAlphaMode)
Creates a CanvasBitmap from the bytes of the specified buffer, 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,
	IBuffer buffer,
	int widthInPixels,
	int heightInPixels,
	DirectXPixelFormat format,
	float dpi,
	CanvasAlphaMode alpha
)

Parameters

resourceCreator
Type: Microsoft.Graphics.Canvas.ICanvasResourceCreator
buffer
Type: Windows.Storage.Streams.IBuffer
widthInPixels
Type: System.Int32
heightInPixels
Type: System.Int32
format
Type: Windows.Graphics.DirectX.DirectXPixelFormat
dpi
Type: System.Single
alpha
Type: Microsoft.Graphics.Canvas.CanvasAlphaMode

Return Value

Type: CanvasBitmap
Remarks
See Also