accepts 2 BufferedImages as input, compare them, make a difference image, and calculate the ratio of difference of the 2 input images.
| Type | Name and description |
|---|---|
static org.slf4j.Logger |
logger_ |
| Constructor and description |
|---|
ImageDifference
() |
ImageDifference
(java.awt.image.BufferedImage expected, java.awt.image.BufferedImage actual) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.awt.image.BufferedImage |
copyImage(java.awt.image.BufferedImage source)deep copy the source BufferedImage to create a new one |
|
void |
flush()free the memory occupied by the BufferedImages |
|
java.awt.image.BufferedImage |
getActualImage() |
|
java.awt.image.BufferedImage |
getDiffImage() |
|
java.awt.image.BufferedImage |
getExpectedImage() |
|
java.lang.Double |
getRatio()@return e.g. 0.23% or 90.0% |
|
java.lang.String |
getRatioAsString(java.lang.String fmt = '%1$.2f')@return e.g. "0.23" or "90.00" |
|
java.lang.Boolean |
imagesAreDifferent(double criteria)@return true if the expected image and the actual image pair has greater difference than the criteria = these are different enough, otherwise false. |
|
java.lang.Boolean |
imagesAreSimilar(double criteria)
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
deep copy the source BufferedImage to create a new one
free the memory occupied by the BufferedImages
Groovy Documentation