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

10
LINES

< > BotCompany Repo | #1006815 // rgbImageSectionsIdentical

JavaX fragment (include)

1  
static bool rgbImageSectionsIdentical(RGBImage a, Rect r1, RGBImage b, Rect r2) {
2  
  assertEquals(r1.w, r2.w);
3  
  assertEquals(r1.h, r2.h);
4  
  int w = r1.w, h = r1.h;
5  
  for (int yy = 0; yy < h; yy++)
6  
    for (int xx = 0; xx < w; xx++)
7  
      if (a.getInt(r1.x+xx, r1.y+yy) != b.getInt(r2.x+xx, r2.y+yy))
8  
        false;
9  
  true;
10  
}

Author comment

Began life as a copy of #1005928

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: #1006815
Snippet name: rgbImageSectionsIdentical
Eternal ID of this version: #1006815/3
Text MD5: 9f167da88d206279418275e48d8a1a1d
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-05 03:48:34
Source code size: 333 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 516 / 522
Version history: 2 change(s)
Referenced in: [show references]