Imaging.CreateBitmapSourceFromMemorySection 方法

定义

基于所提供的非托管内存位置,返回托管的 BitmapSource

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

参数

section
IntPtr

nativeint

内存部分的指针。

pixelWidth
Int32

用于指定位图宽度(以像素为单位)的整数。

pixelHeight
Int32

用于指定位图高度(以像素为单位)的整数。

format
PixelFormat

枚举的一个值。

stride
Int32

位图的跨距。

offset
Int32

图像从其开始的内存流字节偏移量。

返回

BitmapSource

创建的 BitmapSource

属性

适用于

另请参阅