Windows.UI.Xaml.Media.Imaging.WriteableBitmap

July 6, 2022 ยท View on GitHub

-description

Provides a BitmapSource that can be written to and updated.

-remarks

The image source data of a WriteableBitmap is an underlying pixel buffer.

The IBuffer returned by WriteableBitmap.PixelBuffer can't be written to directly. But you can use language-specific techniques to write to the underlying pixel content in the buffer. For details, see the Remarks section of WriteableBitmap.PixelBuffer.

Some of the scenarios where you might have used a WriteableBitmap class in previous XAML frameworks can be accomplished in the Windows Runtime by using the RenderTargetBitmap class instead. For more info see RenderTargetBitmap.

-examples

For code examples in C#, C++/WinRT, and C++/CX, see WriteableBitmap.PixelBuffer.

-see-also

BitmapSource, WriteableBitmap.PixelBuffer, BitmapDecoder, Windows.Graphics.Imaging namespace, XAML images sample, Camera preview frame sample (Windows 10)