Udostępnij za pośrednictwem


BitmapEncoder.SetSoftwareBitmap(SoftwareBitmap) Method

Definition

Sets the image data of the current frame using the specified SoftwareBitmap.

public:
 virtual void SetSoftwareBitmap(SoftwareBitmap ^ bitmap) = SetSoftwareBitmap;
void SetSoftwareBitmap(SoftwareBitmap const& bitmap);
public void SetSoftwareBitmap(SoftwareBitmap bitmap);
function setSoftwareBitmap(bitmap)
Public Sub SetSoftwareBitmap (bitmap As SoftwareBitmap)

Parameters

bitmap
SoftwareBitmap

The software bitmap containing the image data.

Remarks

BitmapEncoder only supports software bitmaps that have a BitmapPixelFormat of Rgba16, Rgba8, or Bgra8. Attempting to call SetSoftwareBitmap with a software bitmap that has a different pixel format results in a format unsupported error. Use the SoftwareBitmap.Convert method to create a copy of an existing software bitmap with a different pixel format.

Applies to