CreateBitmapSourceFromMemorySection Method
Collapse the table of content
Expand the table of content

Imaging.CreateBitmapSourceFromMemorySection Method

Returns a managed BitmapSource, based on the provided unmanaged memory location.

Namespace: System.Windows.Interop
Assembly: PresentationCore (in presentationcore.dll)

public static BitmapSource CreateBitmapSourceFromMemorySection (
	IntPtr section,
	int pixelWidth,
	int pixelHeight,
	PixelFormat format,
	int stride,
	int offset
)
public static BitmapSource CreateBitmapSourceFromMemorySection (
	IntPtr section, 
	int pixelWidth, 
	int pixelHeight, 
	PixelFormat format, 
	int stride, 
	int offset
)
public static function CreateBitmapSourceFromMemorySection (
	section : IntPtr, 
	pixelWidth : int, 
	pixelHeight : int, 
	format : PixelFormat, 
	stride : int, 
	offset : int
) : BitmapSource
You cannot use methods in XAML.

Parameters

section

A pointer to a memory section.

pixelWidth

An integer that specifies the width, in pixels, of the bitmap.

pixelHeight

An integer that specifies the height, in pixels, of the bitmap.

format

A value of the enumeration.

stride

The stride of the bitmap.

offset

The byte offset into the memory stream where the image starts.

Return Value

The created BitmapSource.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2016 Microsoft