public NeonEffect() { var saturationLightnessEffect = new SaturationLightnessEffect(null, new Curve(CurveInterpolation.Linear, new[] { new Point(0, 36), new Point(45, 60), new Point(104, 146), new Point(197, 207), new Point(255, 245) })); var hslEffect = new HueSaturationLightnessEffect { SaturationCurve = PhotoshopAlike.CreateCurveFromHueRangeAdjustments( new PhotoshopAlike.HueRangeAdjustment(0, 60), new PhotoshopAlike.HueRangeAdjustment(1, -5), new PhotoshopAlike.HueRangeAdjustment(2, -7), new PhotoshopAlike.HueRangeAdjustment(3, -10), new PhotoshopAlike.HueRangeAdjustment(5, 25), new PhotoshopAlike.HueRangeAdjustment(6, 22)) }; LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), saturationLightnessEffect), new AdjustmentLayer(LayerStyle.Normal(), Lookups.NeonCurvesEffect), new AdjustmentLayer(LayerStyle.Normal(), hslEffect), new AdjustmentLayer(LayerStyle.Normal(), context => new CachingEffect()), new AdjustmentLayer(LayerStyle.Softlight(0.75), context => new SDKTestApp_Native.HighpassEffect(32, false, 8)) ); }
public SketchEffect() { LayerList.AddRange(new Layer[] { new AdjustmentLayer(LayerStyle.Normal(0.64), new GrayscaleEffect(0.23, 0.60, 0.33, -0.1)), new AdjustmentLayer(LayerStyle.Multiply(), new Lumia.Imaging.Artistic.SketchEffect(SketchMode.Gray)) }); }
public LoSatWarmEffect() { LayerList.AddRange( new Layer(LayerStyle.Overlay(0.1), context => new ColorImageSource(context.BackgroundLayer.ImageSize, Color.FromArgb(255, 255, 242, 0))), new AdjustmentLayer(LayerStyle.Normal(0.45), new GrayscaleEffect(0.35, 0.66, 0.0, -0.05)), new AdjustmentLayer(LayerStyle.Normal(), Lookups.LoSatWarmCurvesEffect), new Layer(LayerStyle.Softlight(0.5), context => Lookups.LoSatWarmVignette.GetAsync(context.BackgroundLayer.ImageSize)) ); }
public void LayersCanBeAddedWithAddRange() { var layerList = new LayerList(); layerList.AddRange(new[] { new Layer(LayerStyle.Add(0.5), context => new ColorImageSource(context.BackgroundLayer.ImageSize, Color.FromArgb(255, 128, 128, 128))), new AdjustmentLayer(LayerStyle.Normal(), new BrightnessEffect(0.9)) }); }
public BWCopperEffect() { LayerList.AddRange( // Channel mixer new AdjustmentLayer(LayerStyle.Normal(), new GrayscaleEffect(0.54, 0.64, 0.0, -0.1)), // "Curves 1" and "Layer 1". new AdjustmentLayer(LayerStyle.Normal(), Lookups.CopperCurvesEffect) ); }
public CrossProcessColdEffect() { LayerList.AddRange( // "Curves 1" new AdjustmentLayer(LayerStyle.Normal(), Lookups.ColdCurvesEffect), // "Layer 1" new Layer(LayerStyle.Overlay(0.8), context => new NoiseImageSource(context.HintedRenderSize, 12)), // "Layer 2" new Layer(LayerStyle.Softlight(), context => Lookups.ColdVignette.GetAsync(context.HintedRenderSize)) ); }
public OpalEffect() { m_cachingEffect = new CachingEffect(); var clarityList = new LayerList( new AdjustmentLayer(LayerStyle.Normal(), m_cachingEffect), new AdjustmentLayer(LayerStyle.Softlight(), new SDKTestApp_Native.HighpassEffect(100, true, 8)) ); m_selectiveColorEffect = new SelectiveColorEffect { Red = new CMYK { Yellow = 5 }, Yellow = new CMYK { Yellow = 40, Key = 15 }, Green = new CMYK { Cyan = 20, Yellow = 20, Key = 30 }, Cyan = new CMYK { Key = 61 }, Blue = new CMYK { Key = 30 } }; LayerList.AddRange( // Clarity new Layer(LayerStyle.Darken(0.5), context => clarityList.ToImageProvider(context.BackgroundImage, context.HintedRenderSize)), new AdjustmentLayer(LayerStyle.Normal(), m_selectiveColorEffect), new AdjustmentLayer(LayerStyle.Normal(), new HueSaturationEffect(0.0, 0.06)), new AdjustmentLayer(LayerStyle.Normal(), new VibranceEffect() { Level = 0.1 }), new Layer(LayerStyle.Overlay(), context => new ColorImageSource(context.HintedRenderSize, Color.FromArgb(0xFF, 0xFF, 0xE6, 0x99))) ); /* Editors.Add(new RangeEditorViewModel<OpalEffect>("SaturationLevel", -1.0, 1.0, this, filter => filter.SaturationLevel, (filter, value) => filter.SaturationLevel = value)); * // Editors.Add(new RangeEditorViewModel<OpalEffect>("ContrastLevel", -1.0, 1.0, this, filter => filter.ContrastLevel, (filter, value) => filter.ContrastLevel = value)); * Editors.Add(new RangeEditorViewModel<OpalEffect>("VibranceLevel", 0, 1.0, this, filter => filter.VibranceLevel, (filter, value) => filter.VibranceLevel = value)); * Editors.Add(new RangeEditorViewModel<OpalEffect>("ShadowsHue", 0, 365, this, filter => filter.ShadowsHue, (filter, value) => filter.ShadowsHue = (int)value)); * Editors.Add(new RangeEditorViewModel<OpalEffect>("ShadowsSaturation", 0, 100, this, filter => filter.ShadowsSaturation, (filter, value) => filter.ShadowsSaturation = (int)value)); * Editors.Add(new RangeEditorViewModel<OpalEffect>("HighlightsHue", 0, 365, this, filter => filter.HighlightsHue, (filter, value) => filter.HighlightsHue = (int)value)); * Editors.Add(new RangeEditorViewModel<OpalEffect>("HighlightsSaturation", 0, 100, this, filter => filter.HighlightsSaturation, (filter, value) => filter.HighlightsSaturation = (int)value)); */ }
public MagzineStarEffect() { var overlayFactory = new OverlayFactory( "ms-appx:///images/Filters_Landscape_Overlay_Magazine.png", "ms-appx:///images/Filters_Portrait_Overlay_Magazine.png", "ms-appx:///images/Filters_Square_Overlay_Magazine.png") { HorizontalAlignment = HorizontalAlignment.None }; LayerList.AddRange( new Layer(LayerStyle.Normal(targetArea: new Rect(0.02, 0.02, 0.96, 0.96)), context => overlayFactory.CreateAsync(context.HintedRenderSize)) ); }
public ReflectiveGlassEffect() { var overlayFactory = new OverlayFactory( "ms-appx:///images/Filters_Landscape_Overlay_Reflect.jpg", "ms-appx:///images/Filters_Portrait_Overlay_Reflect.jpg", "ms-appx:///images/Filters_Square_Overlay_Reflect.jpg") { HorizontalAlignment = HorizontalAlignment.None }; LayerList.AddRange( new Layer(LayerStyle.Screen(), context => overlayFactory.CreateAsync(context.BackgroundLayer.ImageSize)) ); }
public VividEffect() { LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), new VibranceEffect { Level = 0.4f / 1.6f }), new AdjustmentLayer(LayerStyle.Normal(), Lookups.VividCurvesEffect), new AdjustmentLayer(LayerStyle.Normal(), context => new CachingEffect { Size = context.HintedRenderSize }), new AdjustmentLayer(LayerStyle.Softlight(0.75), new SDKTestApp_Native.HighpassEffect(72, true, 0)), new Layer(LayerStyle.Softlight(), context => Lookups.VividVignette.GetAsync(context.HintedRenderSize)) ); }
public BwAntiqueEffect() { var globalCurvesEffect = new CurvesEffect(new Curve(CurveInterpolation.NaturalCubicSpline) { Points = new[] { new Point(0, 0), new Point(58, 73), new Point(212, 218), new Point(255, 255) } }); LayerList.AddRange(new [] { new AdjustmentLayer(LayerStyle.Normal(), new GrayscaleEffect(0.54, 0.64, 0.0, -0.1)), new AdjustmentLayer(LayerStyle.Normal(), globalCurvesEffect), new Layer(LayerStyle.Hardlight(0.4), context => new ColorImageSource(context.BackgroundLayer.ImageSize, Color.FromArgb(255, 166, 124, 82))) }); }
public BWloEffect() { var curve = new Curve(CurveInterpolation.NaturalCubicSpline, new[] { new Point(0, 65), new Point(83, 109), new Point(160, 158), new Point(255, 239) }); LayerList.AddRange( // Curves new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(curve)), // Channel mixer. new AdjustmentLayer(LayerStyle.Normal(), new GrayscaleEffect(0.69, 0.61, -0.15, -0.1)), // Noise new Layer(LayerStyle.Overlay(), context => new NoiseImageSource(context.HintedRenderSize, 19)) ); }
public IndoorEffect() { LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), Lookups.IndoorCurvesEffect), new AdjustmentLayer(LayerStyle.Normal(), new HueSaturationLightnessEffect { SaturationCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(0, -10), new EffectPhotoExtensions.HueRangeAdjustment(1, 15), new EffectPhotoExtensions.HueRangeAdjustment(2, -35), new EffectPhotoExtensions.HueRangeAdjustment(5, -35) ), LightnessCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(2, -5) ) }), new AdjustmentLayer(LayerStyle.Normal(), new SaturationLightnessEffect(null, new Curve(CurveInterpolation.Linear, new[] { new Point(0, 25) }))), new AdjustmentLayer(LayerStyle.Normal(), new VibranceEffect { Level = 0.3 / 1.6 }) ); }
public BWHiEffect() { var globalCurve = new Curve(CurveInterpolation.NaturalCubicSpline, new[] { new Point(0, 8), new Point(42, 29), new Point(137, 157), new Point(220, 229), new Point(255, 251) }); var redCurve = new Curve(CurveInterpolation.NaturalCubicSpline, new[] { new Point(0, 0), new Point(93, 79), new Point(149, 117), new Point(207, 186), new Point(255, 255) }); var greenCurve = new Curve(CurveInterpolation.NaturalCubicSpline, new[] { new Point(0, 0), new Point(118, 125), new Point(255, 255) }); Curve.Compose(globalCurve, redCurve, redCurve); Curve.Compose(globalCurve, greenCurve, greenCurve); var blueCurve = globalCurve; LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(redCurve, greenCurve, blueCurve)), new AdjustmentLayer(LayerStyle.Normal(), new GrayscaleEffect(0.39, 0.55, 0.32, -0.1)) ); }
public SunsetEffect() { var curvesEffectTask = new LookupCurves("Images\\sunset_table.bmp").GetEffectAsync(); var hslEffect = new HueSaturationLightnessEffect() { SaturationCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(0, 19), // master new EffectPhotoExtensions.HueRangeAdjustment(1, 15), // red new EffectPhotoExtensions.HueRangeAdjustment(2, 5), // etc new EffectPhotoExtensions.HueRangeAdjustment(5, 15), new EffectPhotoExtensions.HueRangeAdjustment(6, 20)), LightnessCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(1, -5), new EffectPhotoExtensions.HueRangeAdjustment(2, -5), new EffectPhotoExtensions.HueRangeAdjustment(5, -5), new EffectPhotoExtensions.HueRangeAdjustment(6, -5)) }; var curvesEffect = new CurvesEffect(new Curve(CurveInterpolation.Linear, new[] { new Point(255, 255 - EffectPhotoExtensions.ConvertAdjustmentLevel(5)) })); LayerList.AddRange( // Curves // HSL new AdjustmentLayer(LayerStyle.Normal(), curvesEffectTask), new AdjustmentLayer(LayerStyle.Normal(), hslEffect), new AdjustmentLayer(LayerStyle.Normal(), curvesEffect), // Gradient new Layer(LayerStyle.Overlay(0.35), context => Lookups.SunsetVignette.GetAsync(context.BackgroundLayer.ImageSize)) ); }
public void LayersCanBeAddedWithAddRange() { var layerList = new LayerList(); layerList.AddRange(new[] { new Layer(LayerStyle.Add(0.5), context => new ColorImageSource(context.BackgroundLayer.ImageSize, Color.FromArgb(255,128,128,128))), new AdjustmentLayer(LayerStyle.Normal(), new BrightnessEffect(0.9)) }); }
public RetrotoneEffect() { // Curves var globalCurve = new Curve(CurveInterpolation.Linear, new[] { new Point(0, 45), new Point(33, 57), new Point(178, 207), new Point(255, 236) }); var curves = new Curve[3]; curves[0] = new Curve(CurveInterpolation.Linear, new[] { new Point(10, 0), new Point(34, 25), new Point(124, 119), new Point(255, 246), new Point(255, 255) }); curves[1] = new Curve(CurveInterpolation.Linear, new[] { new Point(0, 0), new Point(37, 32), new Point(209, 213), new Point(255, 250), new Point(255, 255) }); curves[2] = new Curve(CurveInterpolation.Linear, new[] { new Point(0, 52), new Point(29, 62), new Point(100, 102), new Point(176, 171), new Point(222, 211), new Point(255, 239), new Point(255, 255) }); Curve.Compose(globalCurve, curves[0], curves[0]); Curve.Compose(globalCurve, curves[1], curves[1]); Curve.Compose(globalCurve, curves[2], curves[2]); var curvesEffect = new CurvesEffect(curves[0], curves[1], curves[2]); var hslEffect = new HueSaturationLightnessEffect { SaturationCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(0, -25), new EffectPhotoExtensions.HueRangeAdjustment(2, 5), new EffectPhotoExtensions.HueRangeAdjustment(5, 10)), LightnessCurve = EffectPhotoExtensions.CreateCurveFromHueRangeAdjustments( new EffectPhotoExtensions.HueRangeAdjustment(1, -4), new EffectPhotoExtensions.HueRangeAdjustment(2, -9), new EffectPhotoExtensions.HueRangeAdjustment(3, -4), new EffectPhotoExtensions.HueRangeAdjustment(4, -4), new EffectPhotoExtensions.HueRangeAdjustment(5, -9), new EffectPhotoExtensions.HueRangeAdjustment(6, -4)) }; LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), curvesEffect), // Hue/Saturation new AdjustmentLayer(LayerStyle.Normal(), hslEffect), // Noise new Layer(LayerStyle.Overlay(), context => new NoiseImageSource(context.BackgroundLayer.ImageSize, 13)), // Vignette new Layer(new LayerStyle(BlendFunction.Hardlight, 0.25, context => Lookups.RetrotoneVignette.GetAsync(context.BackgroundLayer.ImageSize)), context => new ColorImageSource(context.BackgroundLayer.ImageSize, Windows.UI.Color.FromArgb(255, 0, 0, 0))) ); }
public QuartzEffect() { m_cachingEffect = new CachingEffect(); var curve = new Curve(); curve.SetPoint(16, 7); curve.SetPoint(39, 24); curve.SetPoint(208, 223); curve.SetPoint(234, 247); var positiveBrightnessCurve = new Curve(CurveInterpolation.Linear, new[] { new Point(48, 124), new Point(64, 162), new Point(80, 193), new Point(96, 214), new Point(112, 229), new Point(128, 239), new Point(144, 245), new Point(160, 249), new Point(192, 253), new Point(240, 255) }); var negativeBrightnessCurve = new Curve(CurveInterpolation.Linear, new[] { new Point(160, 63), new Point(192, 79), new Point(208, 90), new Point(224, 106), new Point(236, 123), new Point(244, 141), new Point(248, 156), new Point(252, 183) }); var brightnessCurve = Curve.Interpolate(new Curve(), positiveBrightnessCurve, 0.1, null); var clarityList = new LayerList( new AdjustmentLayer(LayerStyle.Normal(), m_cachingEffect), new AdjustmentLayer(LayerStyle.Softlight(), new SDKTestApp_Native.HighpassEffect(100, true, 8)) ); LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(curve)), new AdjustmentLayer(LayerStyle.Normal(), new CurvesEffect(brightnessCurve)), // Clarity new Layer(LayerStyle.Darken(), context => clarityList.ToImageProvider(context.BackgroundImage, context.HintedRenderSize)), new AdjustmentLayer(LayerStyle.Normal(), new HueSaturationEffect(0, 0.65 - 1)), new AdjustmentLayer(LayerStyle.Normal(), new VibranceEffect() { Level = 0.1 }), new AdjustmentLayer(LayerStyle.Normal(), new SDKTestApp_Native.SplitToneEffect() { HighlightsSaturation = 42, HighlightsHue = 45 }) ); }
public SeaShellEffect() { m_hueSaturationEffect = new HueSaturationEffect() { Saturation = 0.6 - 1 }; m_vibranceEffect = new VibranceEffect() { Level = .6 }; m_splitToningEffect = new SplitToneEffect { ShadowsHue = 230, ShadowsSaturation = 37, HighlightsHue = 50, HighlightsSaturation = 20 }; var globalCurve = new Curve(CurveInterpolation.Linear, new[] { new Point(0, 10), new Point(32, 68), new Point(64, 119), new Point(96, 158), new Point(128, 187), new Point(160, 209), new Point(192, 226), new Point(255, 248) }); var curve = new Curve(CurveInterpolation.Linear, new[] { new Point(10, 0), new Point(32, 27), new Point(70, 70) }); var redCurve = globalCurve; var greenCurve = Curve.Compose(curve, globalCurve, null); var blueCurve = globalCurve; var curvesEffect = new CurvesEffect(redCurve, greenCurve, blueCurve); var colorizationLayerList = new LayerList( new AdjustmentLayer(LayerStyle.Normal(), new GrayscaleEffect()), new Layer(LayerStyle.Multiply(), context => new ColorImageSource(context.HintedRenderSize, Color.FromArgb(0xff, 0xff, 0xe6, 0x99))) ); LayerList.AddRange( new AdjustmentLayer(LayerStyle.Normal(0.2), context => colorizationLayerList.ToImageProvider(context.BackgroundImage, context.HintedRenderSize, context.HintedRenderSize)), new AdjustmentLayer(LayerStyle.Normal(), new ContrastEffect(-0.15)), new AdjustmentLayer(LayerStyle.Normal(), curvesEffect), new AdjustmentLayer(LayerStyle.Normal(), m_hueSaturationEffect), new AdjustmentLayer(LayerStyle.Normal(), m_vibranceEffect), new AdjustmentLayer(LayerStyle.Normal(), m_splitToningEffect) ); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("SaturationLevel", -1.0, 1.0, this, filter => filter.SaturationLevel, (filter, value) => filter.SaturationLevel = value)); // Editors.Add(new RangeEditorViewModel<SeaShellEffect>("ContrastLevel", -1.0, 1.0, this, filter => filter.ContrastLevel, (filter, value) => filter.ContrastLevel = value)); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("VibranceLevel", 0, 1.0, this, filter => filter.VibranceLevel, (filter, value) => filter.VibranceLevel = value)); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("ShadowsHue", 0, 365, this, filter => filter.ShadowsHue, (filter, value) => filter.ShadowsHue = (int)value)); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("ShadowsSaturation", 0, 100, this, filter => filter.ShadowsSaturation, (filter, value) => filter.ShadowsSaturation = (int)value)); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("HighlightsHue", 0, 365, this, filter => filter.HighlightsHue, (filter, value) => filter.HighlightsHue = (int)value)); Editors.Add(new RangeEditorViewModel <SeaShellEffect>("HighlightsSaturation", 0, 100, this, filter => filter.HighlightsSaturation, (filter, value) => filter.HighlightsSaturation = (int)value)); }