public void ScreenBlendOp2() { var lhs = GetSourceImage("blend1.png"); var rhs = GetSourceImage("blend2.png"); var lhs_wrap = new BitmapWrapper(lhs); var rhs_wrap = new BitmapWrapper(rhs); var op = new ScreenBlendOp(); op.Apply(rhs_wrap, lhs_wrap); Compare(lhs, "screenblend2.png"); }
/// <summary> /// Creates a new effect that will add a glowing effect to an image. /// </summary> /// <param name="radius">Radius used to blur the image (higher is blurrier). Valid range is 1 - 20.</param> /// <param name="brightness">Brightness amount to apply.</param> /// <param name="contrast">Contrast amount to apply.</param> public GlowEffect(int radius = 6, int brightness = 10, int contrast = 10) { if (radius < 1 || radius > 20) { throw new ArgumentOutOfRangeException("radius"); } if (brightness < -100 || brightness > 100) { throw new ArgumentOutOfRangeException("brightness"); } if (contrast < -100 || contrast > 100) { throw new ArgumentOutOfRangeException("contrast"); } this.radius = radius; this.brightness = brightness; this.contrast = contrast; blur_effect = new GaussianBlurEffect(radius); contrast_effect = new BrightnessContrastEffect(brightness, contrast); screen_op = new ScreenBlendOp(); }