public void Setup() { originalBitmap = CreateOriginal(); watermarkBitmap = CreateWatermark(); ratio = 0.5M; parameters = new PixelAveragingParameters(originalBitmap.TransformToEffectiveBitmap(), watermarkBitmap.TransformToEffectiveBitmap(), null, ratio); algorithm = new PixelAveraging(parameters); }
protected override Task ProcessRemoving(CancellationToken ct) { return(Task.Run(async() => { ct.ThrowIfCancellationRequested(); var p = ReadParameters(); ct.ThrowIfCancellationRequested(); var algorithm = new PixelAveraging(p); var result = algorithm.RemoveWatermark(ct); await ShowAlgorithmOutput(result); })); }