We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.testbench.screenshot.
Package com.vaadin.testbench.screenshot
Class ImageComparisonUtil
java.lang.Object
com.vaadin.testbench.screenshot.ImageComparisonUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateImageHash
(BufferedImage image) Generates blocks representing an image by dividing the image up in 16x16 pixel blocks and calculating a mean value of the color in each block.
static int
getNrBlocks
(int pixels) Returns the number of blocks used for the given number of pixels.
-
Constructor Details
-
ImageComparisonUtil
public ImageComparisonUtil()
-
-
Method Details
-
generateImageHash
Generates blocks representing an image by dividing the image up in 16x16 pixel blocks and calculating a mean value of the color in each block.
Parameters:
image
- the imageReturns:
the block representation of the image
-
getNrBlocks
public static int getNrBlocks(int pixels) Returns the number of blocks used for the given number of pixels. All blocks are full size with the (possible) exception of the bottom and right edges.
Parameters:
pixels
- The number of pixels for the dimension.Returns:
The number of blocks used for that dimension
-