Exemple #1
0
        /// <summary>
        /// Constructor initializes and compares pixel-by-pixel two Bitmap objects with predefined BitmapDifference object
        /// </summary>
        /// <param name="a">First Bitmap object (will serve as base to display differences on)</param>
        /// <param name="b">Second Bitmap object which will be compared to the first</param>
        /// <param name="d">Predefined BitmapDifference object (can be used to accumulate differences from multiple comparisons)</param>
        public BitmapComparator(BitmapEditor a, BitmapEditor b, BitmapDifference d)
        {
            bitmapComparatorBitmapA = a;
            bitmapComparatorBitmapB = b;

            bitmapComparatorDifference = d;

            Compare();
        }
Exemple #2
0
        /// <summary>
        /// Constructor initializes and compares pixel-by-pixel two Bitmap objects
        /// </summary>
        /// <param name="a">First Bitmap object (will serve as base to display differences on)</param>
        /// <param name="b">Second Bitmap object which will be compared to the first</param>
        public BitmapComparator(BitmapEditor a, BitmapEditor b)
        {
            bitmapComparatorBitmapA = a;
            bitmapComparatorBitmapB = b;

            bitmapComparatorDifference = new BitmapDifference(bitmapComparatorBitmapA);

            Compare();
        }
        public BitmapBatchComparator(BitmapBatch batch)
        {
            bitmapBatch = batch;

            // Check number of Bitmap objects in BitmapBatch
            if (bitmapBatch.Count < 2)
            {
                throw new Exception("BitmapBatch object needs to contain at least two Bitmap objects");
            }

            // Initialize BitmapDifference holder
            bitmapDifference = new BitmapDifference(bitmapBatch[0]);

            Compare();
        }