مشاركة عبر


SoftwareBitmap.CopyFromBuffer(IBuffer) Method

Definition

Copies the pixel data from an IBuffer into the SoftwareBitmap.

public:
 virtual void CopyFromBuffer(IBuffer ^ buffer) = CopyFromBuffer;
void CopyFromBuffer(IBuffer const& buffer);
public void CopyFromBuffer(IBuffer buffer);
function copyFromBuffer(buffer)
Public Sub CopyFromBuffer (buffer As IBuffer)

Parameters

buffer
IBuffer

The buffer containing the pixel data to be copied.

Examples

For a code example showing how to access pixel data, see the WriteableBitmap.PixelBuffer property.

Remarks

Use this method to copy data from the PixelBuffer of a WriteableBitmap into an existing SoftwareBitmap.

This method assumes that the input buffer has the same pixel format, width, height, color space, alpha mode, and DPI. It also assumes that the data in the buffer is contiguous. In other words, it expects that the stride of the image is equal to the width, with no additional padding.

Applies to

See also