Share via


SoftwareBitmap.CreateCopyFromBuffer 方法

定義

多載

CreateCopyFromBuffer(IBuffer, BitmapPixelFormat, Int32, Int32, BitmapAlphaMode)

執行所提供緩衝區的深層複本,以建立新的 SoftwareBitmap 。 對新 SoftwareBitmap 中的資料所做的修改不會影響其建立來源的緩衝區。

CreateCopyFromBuffer(IBuffer, BitmapPixelFormat, Int32, Int32)

執行所提供緩衝區的深層複本,以建立新的 SoftwareBitmap 。 對新 SoftwareBitmap 中的資料所做的修改不會影響其建立來源的緩衝區。

CreateCopyFromBuffer(IBuffer, BitmapPixelFormat, Int32, Int32, BitmapAlphaMode)

執行所提供緩衝區的深層複本,以建立新的 SoftwareBitmap 。 對新 SoftwareBitmap 中的資料所做的修改不會影響其建立來源的緩衝區。

public:
 static SoftwareBitmap ^ CreateCopyFromBuffer(IBuffer ^ source, BitmapPixelFormat format, int width, int height, BitmapAlphaMode alpha);
/// [Windows.Foundation.Metadata.Overload("CreateCopyWithAlphaFromBuffer")]
 static SoftwareBitmap CreateCopyFromBuffer(IBuffer const& source, BitmapPixelFormat const& format, int const& width, int const& height, BitmapAlphaMode const& alpha);
[Windows.Foundation.Metadata.Overload("CreateCopyWithAlphaFromBuffer")]
public static SoftwareBitmap CreateCopyFromBuffer(IBuffer source, BitmapPixelFormat format, int width, int height, BitmapAlphaMode alpha);
function createCopyFromBuffer(source, format, width, height, alpha)
Public Shared Function CreateCopyFromBuffer (source As IBuffer, format As BitmapPixelFormat, width As Integer, height As Integer, alpha As BitmapAlphaMode) As SoftwareBitmap

參數

source
IBuffer

要從中建立複本的來源緩衝區。

format
BitmapPixelFormat

軟體點陣圖的像素格式。

width
Int32

int

軟體點陣圖的寬度,以圖元為單位。

height
Int32

int

軟體點陣圖的高度,以圖元為單位。

alpha
BitmapAlphaMode

軟體點陣圖的 Alpha 模式。

傳回

新的軟體點陣圖。

屬性

另請參閱

適用於

CreateCopyFromBuffer(IBuffer, BitmapPixelFormat, Int32, Int32)

執行所提供緩衝區的深層複本,以建立新的 SoftwareBitmap 。 對新 SoftwareBitmap 中的資料所做的修改不會影響其建立來源的緩衝區。

public:
 static SoftwareBitmap ^ CreateCopyFromBuffer(IBuffer ^ source, BitmapPixelFormat format, int width, int height);
/// [Windows.Foundation.Metadata.Overload("CreateCopyFromBuffer")]
 static SoftwareBitmap CreateCopyFromBuffer(IBuffer const& source, BitmapPixelFormat const& format, int const& width, int const& height);
[Windows.Foundation.Metadata.Overload("CreateCopyFromBuffer")]
public static SoftwareBitmap CreateCopyFromBuffer(IBuffer source, BitmapPixelFormat format, int width, int height);
function createCopyFromBuffer(source, format, width, height)
Public Shared Function CreateCopyFromBuffer (source As IBuffer, format As BitmapPixelFormat, width As Integer, height As Integer) As SoftwareBitmap

參數

source
IBuffer

要從中建立複本的來源緩衝區。

format
BitmapPixelFormat

軟體點陣圖的像素格式。

width
Int32

int

軟體點陣圖的寬度,以圖元為單位。

height
Int32

int

軟體點陣圖的高度,以圖元為單位。

傳回

新的軟體點陣圖。

屬性

備註

使用此方法及其多載,將資料從WriteableBitmapPixelBuffer複製到現有的SoftwareBitmap

另請參閱

適用於