public override void AnalyzeImage(IBitmapCore image) { int points = 100; // TODO: Make option ToneStageOperationParameters pm = (ToneStageOperationParameters)Parameters; if (pm.AutoDarkTone) { mAnalyzedDarkTone = image.FindDarkTone( pm.LightTone, pm.Edge, pm.Softness, pm.AutoDarkCenter, pm.AutoDarkRadius, points); toneselectorwidget1.SelectedDarkTone = mAnalyzedDarkTone; toneselectorwidget1.DarkToneSelectorSymbol = ToneSelectorSymbol.Dot; } if (pm.AutoLightTone) { mAnalyzedLightTone = image.FindLightTone( pm.DarkTone, pm.Edge, pm.Softness, pm.AutoLightCenter, pm.AutoLightRadius, points); toneselectorwidget1.SelectedLightTone = mAnalyzedLightTone; toneselectorwidget1.LightToneSelectorSymbol = ToneSelectorSymbol.Dot; } }
public override void OnDo(IBitmapCore hdp) { int points = 500; // TODO: Make option ToneStageOperationParameters pm = (ToneStageOperationParameters)Parameters; Tone darkTone = pm.DarkTone; Tone lightTone = pm.LightTone; if (pm.AutoDarkTone) { darkTone = hdp.FindDarkTone( pm.LightTone, pm.Edge, pm.Softness, pm.AutoDarkCenter, pm.AutoDarkRadius, points); } if (pm.AutoLightTone) { lightTone = hdp.FindLightTone( pm.DarkTone, pm.Edge, pm.Softness, pm.AutoLightCenter, pm.AutoLightRadius, points); } Console.WriteLine("Basic operations: toning... "); hdp.ApplyTone(darkTone, lightTone, pm.Edge, pm.Softness, delegate(double progress) { return(OnReportProgress(progress)); } ); }
public override void OnDo(IBitmapCore hdp) { int points = 500; // TODO: Make option ToneStageOperationParameters pm = (ToneStageOperationParameters)Parameters; Tone darkTone = pm.DarkTone; Tone lightTone = pm.LightTone; if (pm.AutoDarkTone) { darkTone = hdp.FindDarkTone( pm.LightTone, pm.Edge, pm.Softness, pm.AutoDarkCenter, pm.AutoDarkRadius, points); } if (pm.AutoLightTone) { lightTone = hdp.FindLightTone( pm.DarkTone, pm.Edge, pm.Softness, pm.AutoLightCenter, pm.AutoLightRadius, points); } Console.WriteLine("Basic operations: toning... "); hdp.ApplyTone(darkTone, lightTone, pm.Edge, pm.Softness, delegate (double progress) { return OnReportProgress(progress); } ); }