GPU-based image effects (brightness, contrast) for WPF
https://www.nuget.org/packages/WPF.ImageEffects
- Add clr namespace to root node:
<Window x:Class="WPF.ImageEffects.Demo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:imageeffects="clr-namespace:WPF.ImageEffects;assembly=WPF.ImageEffects"
xmlns:local="clr-namespace:WPF.ImageEffects.Demo"
Title="MainWindow">
- Place shader effect to image control
<Slider x:Name="sliderBrightness" Minimum="-1" Maximum="1" Value="0" />
<Slider x:Name="sliderContrast" Minimum="-1" Maximum="1" Value="0" />
<Image x:Name="image">
<Image.Effect>
<imageeffects:BrightnessContrastEffect
Brightness="{Binding Value, ElementName=sliderBrightness}"
Contrast="{Binding Value, ElementName=sliderContrast}" />
</Image.Effect>
</Image>