static Rect rectOfDifferentPixels(RGBImage img1, RGBImage img2) { rgbImageAssertSameSize(img1, img2); Rect r = null; int w = img1.getWidth(), h = img1.getHeight(); for y to h: for x to w: { if (img1.getInt(x, y) != img2.getInt(x, y)) if (r == null) r = singlePointRect(x, y); else extendRectToIncludePoint_modifyOriginal(r, x, y); } ret r; }
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019584 |
Snippet name: | rectOfDifferentPixels |
Eternal ID of this version: | #1019584/2 |
Text MD5: | 477ff6f7e94ae1a7657fa4f0a568bdf4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-12 23:31:55 |
Source code size: | 397 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 218 / 275 |
Version history: | 1 change(s) |
Referenced in: | [show references] |