ImageThemingUtilities.GetOrCreateThemedBitmapSource Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) |
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
|
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) |
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
|
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean, Boolean) |
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
|
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color)
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
- The luminosity of the image is transformed so that the constant "halo" luminosity blends in with the background. This has the effect of eliminating the halo visually. The "halo" luminosity is an immutable constant, and is not calculated from the input image.
- The image is converted to grayscale if the isEnabled parameter is false. This uses the "biasColor" to determine how to transform the image to grayscale.
public:
static System::Windows::Media::Imaging::BitmapSource ^ GetOrCreateThemedBitmapSource(System::Windows::Media::Imaging::BitmapSource ^ inputImage, System::Windows::Media::Color backgroundColor, bool isEnabled, System::Windows::Media::Color grayscaleBiasColor);
public static System.Windows.Media.Imaging.BitmapSource GetOrCreateThemedBitmapSource (System.Windows.Media.Imaging.BitmapSource inputImage, System.Windows.Media.Color backgroundColor, bool isEnabled, System.Windows.Media.Color grayscaleBiasColor);
static member GetOrCreateThemedBitmapSource : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Color * bool * System.Windows.Media.Color -> System.Windows.Media.Imaging.BitmapSource
Public Function GetOrCreateThemedBitmapSource (inputImage As BitmapSource, backgroundColor As Color, isEnabled As Boolean, grayscaleBiasColor As Color) As BitmapSource
Parameters
- inputImage
- BitmapSource
The input BitmapSource.
- backgroundColor
- Color
The color which the halo color should be targeted to match within the bitmap.
- isEnabled
- Boolean
True if the bitmap should be rendered enabled, false if it should be disabled (grayscaled).
- grayscaleBiasColor
- Color
The color used for biasing grayscale if the image is disabled.
Returns
A new BitmapSource with the requested transformations applied.
Applies to
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean)
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
- The luminosity of the image is transformed so that the constant "halo" luminosity blends in with the background. This has the effect of eliminating the halo visually. The "halo" luminosity is an immutable constant, and is not calculated from the input image.
- The image is converted to grayscale if the isEnabled parameter is false. This uses the "biasColor" to determine how to transform the image to grayscale.
public:
static System::Windows::Media::Imaging::BitmapSource ^ GetOrCreateThemedBitmapSource(System::Windows::Media::Imaging::BitmapSource ^ inputImage, System::Windows::Media::Color backgroundColor, bool isEnabled, System::Windows::Media::Color grayscaleBiasColor, bool isHighContrast);
public static System.Windows.Media.Imaging.BitmapSource GetOrCreateThemedBitmapSource (System.Windows.Media.Imaging.BitmapSource inputImage, System.Windows.Media.Color backgroundColor, bool isEnabled, System.Windows.Media.Color grayscaleBiasColor, bool isHighContrast);
static member GetOrCreateThemedBitmapSource : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Color * bool * System.Windows.Media.Color * bool -> System.Windows.Media.Imaging.BitmapSource
Public Function GetOrCreateThemedBitmapSource (inputImage As BitmapSource, backgroundColor As Color, isEnabled As Boolean, grayscaleBiasColor As Color, isHighContrast As Boolean) As BitmapSource
Parameters
- inputImage
- BitmapSource
The input BitmapSource.
- backgroundColor
- Color
The color which the halo color should be targeted to match within the bitmap.
- isEnabled
- Boolean
True if the bitmap should be rendered enabled, false if it should be disabled (grayscaled).
- grayscaleBiasColor
- Color
The color used for biasing grayscale if the image is disabled.
- isHighContrast
- Boolean
True if the image should be themed for high contrast. False if not.
Returns
A new BitmapSource with the requested transformations applied.
Applies to
GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean, Boolean)
Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.
- The luminosity of the image is transformed so that the constant "halo" luminosity blends in with the background. This has the effect of eliminating the halo visually. The "halo" luminosity is an immutable constant, and is not calculated from the input image.
- The image is converted to grayscale if the isEnabled parameter is false. This uses the "biasColor" to determine how to transform the image to grayscale.
public:
static System::Windows::Media::Imaging::BitmapSource ^ GetOrCreateThemedBitmapSource(System::Windows::Media::Imaging::BitmapSource ^ inputImage, System::Windows::Media::Color backgroundColor, bool isEnabled, System::Windows::Media::Color grayscaleBiasColor, bool isHighContrast, bool enhanceContrastIfNecessary);
public static System.Windows.Media.Imaging.BitmapSource GetOrCreateThemedBitmapSource (System.Windows.Media.Imaging.BitmapSource inputImage, System.Windows.Media.Color backgroundColor, bool isEnabled, System.Windows.Media.Color grayscaleBiasColor, bool isHighContrast, bool enhanceContrastIfNecessary);
static member GetOrCreateThemedBitmapSource : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Color * bool * System.Windows.Media.Color * bool * bool -> System.Windows.Media.Imaging.BitmapSource
Public Function GetOrCreateThemedBitmapSource (inputImage As BitmapSource, backgroundColor As Color, isEnabled As Boolean, grayscaleBiasColor As Color, isHighContrast As Boolean, enhanceContrastIfNecessary As Boolean) As BitmapSource
Parameters
- inputImage
- BitmapSource
The input BitmapSource.
- backgroundColor
- Color
The color which the halo color should be targeted to match within the bitmap.
- isEnabled
- Boolean
True if the bitmap should be rendered enabled, false if it should be disabled (grayscaled).
- grayscaleBiasColor
- Color
The color used for biasing grayscale if the image is disabled.
- isHighContrast
- Boolean
True if the image should be themed for high contrast. False if not.
- enhanceContrastIfNecessary
- Boolean
Whether to render images with enhanced contrast when necessary to meet minimum contrast requirements
Returns
A new BitmapSource with the requested transformations applied.