Пример #1
0
 public override int GetHashCode()
 {
     if (IsEmpty)
     {
         return(0);
     }
     return(Lsb.GetHashCode() ^ Msb.GetHashCode() * 5);
 }
Пример #2
0
        public void Setup()
        {
            originalBitmap   = CreateOriginal();
            watermarkBitmap  = CreateWatermark();
            bitsForWatermark = 1;
            parameters       = new LsbParameters(originalBitmap.TransformToEffectiveBitmap(), watermarkBitmap.TransformToEffectiveBitmap(), null, bitsForWatermark);

            algorithm = new Lsb(parameters);
        }
Пример #3
0
 protected override Task ProcessRemoving(CancellationToken ct)
 {
     return(Task.Run(async() =>
     {
         var p = ReadParameters();
         var algorithm = new Lsb(p);
         var result = algorithm.RemoveWatermark(ct);
         await ShowAlgorithmOutput(result);
     }));
 }
Пример #4
0
 protected override Task ProcessAdding(CancellationToken ct)
 {
     return(Task.Run(async() =>
     {
         ct.ThrowIfCancellationRequested();
         var p = ReadParameters();
         ct.ThrowIfCancellationRequested();
         var algorithm = new Lsb(p);
         var result = algorithm.AddWatermark(ct);
         await ShowAlgorithmOutput(result);
     }));
 }