Transpiled version (8126L) is out of date.
1 | svoid verifyImage2B(BWImage img, Image2B binaryImage, int threshold) {
|
2 | assertSameSize(img, binaryImage); |
3 | int w = img.w(), h = img.h(); |
4 | |
5 | for y to h: |
6 | for x to w: |
7 | if ((img.getInt(x, y) >= threshold) != binaryImage.getBoolPixel(x, y)) |
8 | fail("Wrong pixel at " + x + "/" + y);
|
9 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035046 |
| Snippet name: | verifyImage2B (may be slow) |
| Eternal ID of this version: | #1035046/1 |
| Text MD5: | e9fe8ff0eb7055e52151bc7cda9d90ad |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-25 21:57:42 |
| Source code size: | 305 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 347 / 424 |
| Referenced in: | [show references] |