public System.Windows.Media.Imaging.BitmapSource DoEffect(System.Windows.Media.Imaging.BitmapSource img, int?def) { return(img.UseEffect(new NegativeEffect())); }