Libraryless. Click here for Pure Java version (10745L/62K).
1 | static int compareBWImagesByScanlineOrdering(BWImage a, BWImage b) {
|
2 | assertSameSize(a, b); |
3 | int w = a.getWidth(), h = a.getHeight(); |
4 | for y to h: |
5 | for x to w: {
|
6 | int pix1 = a.getInt(x, y), pix2 = b.getInt(x, y); |
7 | if (pix1 != pix2) ret pix1-pix2; |
8 | } |
9 | ret 0; |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035765 |
| Snippet name: | compareBWImagesByScanlineOrdering |
| Eternal ID of this version: | #1035765/1 |
| Text MD5: | 4417b959f66f502a32a13ada87579083 |
| Transpilation MD5: | 6d493750a1abcdbe392fd5d49727ae70 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-21 17:06:44 |
| Source code size: | 288 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 406 / 485 |
| Referenced in: | [show references] |