aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.RemoteDesktop/IBitmapComparer.cs
blob: 21ba15c2901e145fefd27554a885c18cec269d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.RemoteDesktop
{
    /// <summary>
    /// Represents a bitmap comparison engine which returns a difference object of type <see cref="TFrame"/> between a previous and current bitmaps.
    /// </summary>
    /// <typeparam name="TFrame">Type of frame</typeparam>
    public interface IBitmapComparer<TFrame> where TFrame : IFrame
    {
        /// <summary>
        /// Creates the difference result from two bitmaps.
        /// </summary>
        /// <param name="previousBitmap">The previous bitmap.</param>
        /// <param name="currentBitmap">The current bitmap.</param>
        /// <returns></returns>
        BitmapComparerResult<TFrame> CreateDifference(Bitmap previousBitmap, Bitmap currentBitmap);

        /// <summary>
        /// When max number of differences reached, the comparer will immediately return the current difference frame.
        /// This should enforce the screen capture engine to report 'No Difference Available'.
        /// The value of null (default) means infinite.
        /// </summary>
        long? MaxDifferencesThrow { get; set; }
    }
}