Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1015234 // assertBWImagesIdentical

JavaX fragment (include)

static void assertBWImagesIdentical(BWImage a, BWImage b) {
  int w = a.getWidth(), h = a.getHeight();
  assertEquals("Width", w, b.getWidth());
  assertEquals("Height", h, b.getHeight());
  for y to h: for x to w: {
    byte b1 = a.getByte(x, y), b2 = b.getByte(x, y);
    if (b1 != b2)
      fail("Pixel at  " + x + "/" + y + ": " + b1 + " vs " + b2);
  }
}

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: 424 / 454
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1032256 - assertImagesIdentical
#1034813 - bwImagesIdentical