Class PdfVisualTester.TestImage
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.visualtester.PdfVisualTester.TestImage
-
- Enclosing class:
- PdfVisualTester
public static class PdfVisualTester.TestImage extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImage
createDiff()
Creates a diff image to quickly spot differences between expected and actual.BufferedImage
getActual()
Get the actual rendered image.BufferedImage
getExpected()
Get the expected rendered image.int
getPageNumber()
String
getTestName()
boolean
hasDifferences()
Should usually be called beforecreateDiff()
.
-
-
-
Method Detail
-
getTestName
public String getTestName()
- Returns:
- the test name passed into
PdfVisualTester.comparePdfDocuments(byte[], byte[], String, boolean)
-
getPageNumber
public int getPageNumber()
- Returns:
- the page number.
-
getExpected
public BufferedImage getExpected()
Get the expected rendered image.- Returns:
- the expected image, should never be null.
-
getActual
public BufferedImage getActual()
Get the actual rendered image.- Returns:
- the actual image, may be null if expected has more pages than actual
-
createDiff
public BufferedImage createDiff()
Creates a diff image to quickly spot differences between expected and actual. NOTE: May be expensive for large images.- Returns:
- the diff image.
-
hasDifferences
public boolean hasDifferences()
Should usually be called beforecreateDiff()
.- Returns:
- true if the images are different. Precaulculated.
-
-