abbot.tester
Class ImageComparator
java.lang.Object
|
+--abbot.tester.ImageComparator
- All Implemented Interfaces:
- Comparator
- public class ImageComparator
- extends Object
- implements Comparator
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
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageComparator
public ImageComparator()
writeJPEG
public static void writeJPEG(File file,
BufferedImage img)
throws IOException
- Write the given buffered image to disk.
compare
public int compare(Object obj1,
Object obj2)
- Compare two images. May be BufferedImages or File arguments.
- Specified by:
compare
in interface Comparator
equals
public boolean equals(Object obj)
- Comparators are equal if they're the same class.
- Specified by:
equals
in interface Comparator
- Overrides:
equals
in class Object
Copyright © 2002-2003 Timothy Wall. All Rights Reserved.
Abbot is hosted on