Windows.Graphics.Imaging.BitmapEncoder.SetPixelData

August 23, 2018 ยท View on GitHub

-description

Sets pixel data on the frame.

-parameters

-param pixelFormat

The pixel format of the pixel data.

-param alphaMode

The alpha mode of the pixel data.

-param width

The width, in pixels, of the pixel data.

-param height

The height, in pixels, of the pixel data.

-param dpiX

The horizontal resolution, in dots per inch, of the pixel data.

-param dpiY

The vertical resolution, in dots per inch, of the pixel data.

-param pixels

The pixel data.

-remarks

This method is synchronous because data is not committed until FlushAsync, GoToNextFrameAsync or GoToNextFrameAsync(IIterable(IKeyValuePair)) is called.

Setting a pixel format of Unknown will result in failure.

This method treats all pixel data as being in the sRGB color space. When you call this method it automatically clears any existing color space information from the frame, including embedded color profiles.

When you are encoding a new image, before you call FlushAsync at the minimum you must set pixel data using this method.

-examples

-see-also