|
|||||||||
| Home >> All >> abbot >> [ tester overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
abbot.tester
Class ImageComparator

java.lang.Objectabbot.tester.ImageComparator
- All Implemented Interfaces:
- java.util.Comparator
- public class ImageComparator
- extends java.lang.Object
- implements java.util.Comparator
- extends java.lang.Object
This code expects the availability of the com.sun.image.codec.jpeg extensions from the Sun JDK 1.3 or JRE. Original comparison code contributed by asmithmb. author: asmithmontebello@aol.com, twall
| Field Summary | |
private FileComparator |
comparator
|
| Constructor Summary | |
ImageComparator()
|
|
| Method Summary | |
int |
compare(java.lang.Object obj1,
java.lang.Object obj2)
Compare two images. |
private static java.io.File |
convertToJPEGFile(java.lang.Object obj)
|
boolean |
equals(java.lang.Object obj)
Comparators are equal if they're the same class. |
static void |
writeJPEG(java.io.File file,
java.awt.image.BufferedImage img)
Write the given buffered image to disk. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
comparator
private FileComparator comparator
| Constructor Detail |
ImageComparator
public ImageComparator()
| Method Detail |
convertToJPEGFile
private static java.io.File convertToJPEGFile(java.lang.Object obj) throws java.io.IOException
writeJPEG
public static void writeJPEG(java.io.File file, java.awt.image.BufferedImage img) throws java.io.IOException
- Write the given buffered image to disk.
compare
public int compare(java.lang.Object obj1, java.lang.Object obj2)
- Compare two images. May be BufferedImages or File arguments.
- Specified by:
comparein interfacejava.util.Comparator
equals
public boolean equals(java.lang.Object obj)
- Comparators are equal if they're the same class.
- Specified by:
equalsin interfacejava.util.Comparator
|
|||||||||
| Home >> All >> abbot >> [ tester overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
abbot.tester.ImageComparator