Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 2.45 KB

softwarebitmapsource.md

File metadata and controls

27 lines (17 loc) · 2.45 KB
-api-id -api-type
T:Windows.UI.Xaml.Media.Imaging.SoftwareBitmapSource
winrt class

Windows.UI.Xaml.Media.Imaging.SoftwareBitmapSource

-description

Provides a source object, backed by a SoftwareBitmap, for properties that use a bitmap-format image source.

-remarks

SoftwareBitmapSource lets you to use a SoftwareBitmap as an image source to be displayed using an ImageBrush or directly in an Image control. For example, you can use a SoftwareBitmapSource to display a photo just taken by a device's camera using the LowLagPhotoCapture class, to display an image you have manually decoded using the BitmapDecoder.GetSoftwareBitmapAsync method, or to display a custom IWICBitmap in advanced C++ scenarios where you want to manually manage image memory.

A SoftwareBitmap displayed in a XAML app must be in BGRA pixel format with pre-multiplied alpha values.

A SoftwareBitmap typically stores uncompressed image data. This means it can require a large amount of system memory compared to a compressed format like a Portable Network Graphics (PNG) or JPEG file. Therefore, using a SoftwareBitmap can increase the amount of system memory your app is using, which could impact your app’s performance. Because storing uncompressed image data can use a lot of memory, you can call the Dispose (C#/VB) or Close (C++) method to reduce memory usage when the SoftwareBitmap is no longer needed. This causes the associated system resources to be freed immediately rather than waiting for garbage collection.

-examples

-see-also

ImageSource, IClosable