1 | // for unknown reasons, this fails for comparing color with grayscale |
2 | svoid assertImagesIdentical(BufferedImage etc a, BufferedImage etc b) { |
3 | var pix = firstDifferingPixel(a, b); |
4 | if (pix != null) |
5 | fail("Pixel at " + pix.x + "/" + pix.y |
6 | + " (of " + a.getWidth() + "*" + a.getHeight() + "px): " + intToHex(getPixel(a, pix)) + " vs " + intToHex(getPixel(b, pix))); |
7 | } |
Began life as a copy of #1015234
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032256 |
Snippet name: | assertImagesIdentical |
Eternal ID of this version: | #1032256/8 |
Text MD5: | 21e7bfb92dcbf5e5005a051392e8c9f3 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-13 01:55:43 |
Source code size: | 383 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 158 / 204 |
Version history: | 7 change(s) |
Referenced in: | [show references] |