Lines Matching refs:image

25 import java.awt.image.BufferedImage;
33 import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
46 * Utilities related to image processing.
61 public static void requireSimilar(@NonNull String relativePath, @NonNull BufferedImage image)
63 int maxDimension = Math.max(image.getWidth(), image.getHeight());
65 BufferedImage thumbnail = scale(image, scale, scale);
88 BufferedImage image, double maxPercentDifferent) throws IOException {
89 assertEquals("Only TYPE_INT_ARGB image types are supported", TYPE_INT_ARGB, image.getType());
99 int imageWidth = Math.min(goldenImage.getWidth(), image.getWidth());
100 int imageHeight = Math.min(goldenImage.getHeight(), image.getHeight());
106 // image = blur(image, 6);
119 int rgb = image.getRGB(x, y);
158 } else if (Math.abs(goldenImage.getWidth() - image.getWidth()) >= 2) {
161 "vs" + image.getWidth() + "x" + image.getHeight();
162 } else if (Math.abs(goldenImage.getHeight() - image.getHeight()) >= 2) {
165 "vs" + image.getWidth() + "x" + image.getHeight();
168 assertEquals(TYPE_INT_ARGB, image.getType());
173 g.drawImage(image, 2 * imageWidth, 0, null);
189 error = saveImageAndAppendMessage(image, error, relativePath);
198 * Resize the given image
200 * @param source the image to be scaled
203 * @return the scaled image
235 // technique of repeatedly scaling the image into half; this will cause
254 // Then we can successively resize the image in half, 680 to 340 to 170 to 85.
318 * Saves the generated thumbnail image and appends the info message to an initial message
321 private static String saveImageAndAppendMessage(@NonNull BufferedImage image,
328 ImageIO.write(image, "PNG", output);