共用方式為


Imaging.CreateBitmapSourceFromMemorySection 方法

定義

根據所提供的 Unmanaged 記憶體位置,傳回 Managed 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

屬性

適用於

另請參閱