SoftwareBitmapSource SoftwareBitmapSource SoftwareBitmapSource SoftwareBitmapSource Class


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

public : sealed class SoftwareBitmapSource : ImageSource, IClosable
struct winrt::Windows::UI::Xaml::Media::Imaging::SoftwareBitmapSource : ImageSource, IClosable
public sealed class SoftwareBitmapSource : ImageSource, IDisposable
Public NotInheritable Class SoftwareBitmapSource Inherits ImageSource Implements IDisposable

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


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 longer needed. This causes the associated system resources to be freed immediately rather than waiting for garbage collection.


SoftwareBitmapSource() SoftwareBitmapSource() SoftwareBitmapSource() SoftwareBitmapSource()

Initializes a new instance of the SoftwareBitmapSource class.


ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
Close() Close() Close() Close()

Disposes of the object and associated resources.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetBitmapAsync(SoftwareBitmap) SetBitmapAsync(SoftwareBitmap) SetBitmapAsync(SoftwareBitmap) SetBitmapAsync(SoftwareBitmap)

Sets the source SoftwareBitmap to be used as an image source.

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)


Dispatcher Dispatcher Dispatcher Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)

See also