Muokkaa

Jaa


Imaging.CreateBitmapSourceFromMemorySection Method

Definition

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

public:
 static System::Windows::Media::Imaging::BitmapSource ^ CreateBitmapSourceFromMemorySection(IntPtr section, int pixelWidth, int pixelHeight, System::Windows::Media::PixelFormat format, int stride, int offset);
[System.Security.SecurityCritical]
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromMemorySection (IntPtr section, int pixelWidth, int pixelHeight, System.Windows.Media.PixelFormat format, int stride, int offset);
public static System.Windows.Media.Imaging.BitmapSource CreateBitmapSourceFromMemorySection (IntPtr section, int pixelWidth, int pixelHeight, System.Windows.Media.PixelFormat format, int stride, int offset);
[<System.Security.SecurityCritical>]
static member CreateBitmapSourceFromMemorySection : nativeint * int * int * System.Windows.Media.PixelFormat * int * int -> System.Windows.Media.Imaging.BitmapSource
static member CreateBitmapSourceFromMemorySection : nativeint * int * int * System.Windows.Media.PixelFormat * int * int -> System.Windows.Media.Imaging.BitmapSource
Public Shared Function CreateBitmapSourceFromMemorySection (section As IntPtr, pixelWidth As Integer, pixelHeight As Integer, format As PixelFormat, stride As Integer, offset As Integer) As BitmapSource

Parameters

section
IntPtr

nativeint

A pointer to a memory section.

pixelWidth
Int32

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

pixelHeight
Int32

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

format
PixelFormat

A value of the enumeration.

stride
Int32

The stride of the bitmap.

offset
Int32

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

Returns

The created BitmapSource.

Attributes

Applies to

See also