1 | static void assertBWImagesIdentical(BWImage a, BWImage b) {
|
2 | int w = a.getWidth(), h = a.getHeight(); |
3 | assertEquals("Width", w, b.getWidth());
|
4 | assertEquals("Height", h, b.getHeight());
|
5 | for y to h: for x to w: {
|
6 | byte b1 = a.getByte(x, y), b2 = b.getByte(x, y); |
7 | if (b1 != b2) |
8 | fail("Pixel at " + x + "/" + y + ": " + b1 + " vs " + b2);
|
9 | } |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015234 |
| Snippet name: | assertBWImagesIdentical |
| Eternal ID of this version: | #1015234/2 |
| Text MD5: | c028301721776e9c9b65d61588abb606 |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-10 22:36:06 |
| Source code size: | 368 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 688 / 728 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |