コード例 #1
0
        public void Setup()
        {
            originalBitmap  = CreateOriginal();
            watermarkBitmap = CreateWatermark();
            ratio           = 0.5M;
            parameters      = new PixelAveragingParameters(originalBitmap.TransformToEffectiveBitmap(), watermarkBitmap.TransformToEffectiveBitmap(), null, ratio);

            algorithm = new PixelAveraging(parameters);
        }
コード例 #2
0
 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);
     }));
 }