org.zkoss.ztl.util.image
Class DefaultComparator

java.lang.Object
  extended by org.zkoss.ztl.util.image.DefaultComparator
All Implemented Interfaces:
Comparator

public class DefaultComparator
extends java.lang.Object
implements Comparator

A comparer class to compare two images.

Author:
Phoenix, jumperchen

Constructor Summary
DefaultComparator(int comparex, int comparey, int leniency)
           
 
Method Summary
 java.awt.image.BufferedImage compare(java.awt.image.BufferedImage bi1, java.awt.image.BufferedImage bi2)
          Return whether the two images are the same.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComparator

public DefaultComparator(int comparex,
                         int comparey,
                         int leniency)
Method Detail

compare

public java.awt.image.BufferedImage compare(java.awt.image.BufferedImage bi1,
                                            java.awt.image.BufferedImage bi2)
Description copied from interface: Comparator
Return whether the two images are the same. If null, the images are the same, otherwise, the returned image is the change indicator.

Specified by:
compare in interface Comparator
Parameters:
bi1 - the source of the base image
bi2 - the compared image.


Copyright © 2014. All Rights Reserved.