Class FileImageComparator


  • public class FileImageComparator
    extends java.lang.Object
    Allowes compares images in memory to ones stored in files and compare such images one with another.
    Author:
    Alexandre Iline (alexandre.iline@sun.com)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean compare​(java.awt.image.BufferedImage image, java.lang.String fileName)
      Compares an image with one stored in file.
      boolean compare​(java.lang.String fileName1, java.lang.String fileName2)
      Compares two image stored in files..
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileImageComparator

        public FileImageComparator​(ImageComparator comparator,
                                   ImageLoader loader)
        Constructs a FileImageComparator object.
        Parameters:
        comparator - - ImageComparator to be used for image comparision.
        loader - - ImageLoader to be used for image loading.
    • Method Detail

      • compare

        public boolean compare​(java.awt.image.BufferedImage image,
                               java.lang.String fileName)
        Compares an image with one stored in file. Comparision is performed by ImageComparator passed into constructor. Image is loaded by ImageLoader passed into constructor.
        Parameters:
        image - an image to compare.
        fileName - a file containing an image to compare.
        Returns:
        true if images match each other.
      • compare

        public boolean compare​(java.lang.String fileName1,
                               java.lang.String fileName2)
        Compares two image stored in files.. Comparision is performed by ImageComparator passed into constructor. Images are loaded by ImageLoader passed into constructor.
        Parameters:
        fileName1 - a file containing an image to compare.
        fileName2 - a file containing an image to compare.
        Returns:
        true if images match each other.