Class ImageComparisonResult


  • public class ImageComparisonResult
    extends java.lang.Object
    Data transfer objects which contains all the needed data for result of the comparison.
    • Constructor Detail

      • ImageComparisonResult

        public ImageComparisonResult()
    • Method Detail

      • defaultSizeMisMatchResult

        public static ImageComparisonResult defaultSizeMisMatchResult​(java.awt.image.BufferedImage expected,
                                                                      java.awt.image.BufferedImage actual,
                                                                      float differencePercent)
        Create default instance of the ImageComparisonResult with ImageComparisonState.SIZE_MISMATCH.
        Parameters:
        expected - expected BufferedImage object.
        actual - actual BufferedImage object.
        differencePercent - the percent of the differences between images.
        Returns:
        instance of the ImageComparisonResult object.
      • defaultMisMatchResult

        public static ImageComparisonResult defaultMisMatchResult​(java.awt.image.BufferedImage expected,
                                                                  java.awt.image.BufferedImage actual,
                                                                  float differencePercent)
        Create default instance of the ImageComparisonResult with ImageComparisonState.MISMATCH.
        Parameters:
        expected - expected BufferedImage object.
        actual - actual BufferedImage object.
        differencePercent - the persent of the differences between images.
        Returns:
        instance of the ImageComparisonResult object.
      • writeResultTo

        public ImageComparisonResult writeResultTo​(java.io.File file)
        Save the image to the provided File object.
        Parameters:
        file - the provided File object.
        Returns:
        this ImageComparisonResult object.
      • getExpected

        public java.awt.image.BufferedImage getExpected()
      • getActual

        public java.awt.image.BufferedImage getActual()
      • getResult

        public java.awt.image.BufferedImage getResult()
      • getDifferencePercent

        public float getDifferencePercent()
      • getRectangles

        public java.util.List<Rectangle> getRectangles()