Transpiled version (2977L) is out of date.
1 | static BWImage bwInverted(BWImage bw) {
|
2 | if (bw == null) ret bw; |
3 | int w = bw.getWidth(), h = bw.getHeight(); |
4 | BWImage bw2 = new BWImage(w, h); |
5 | for y to h: for x to w: |
6 | bw2.setInt(x, y, 255-bw.getInt(x, y)); |
7 | ret bw2; |
8 | } |
Began life as a copy of #1018878
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024996 |
| Snippet name: | bwInverted - invert BWImage. TODO: optimize |
| Eternal ID of this version: | #1024996/3 |
| Text MD5: | f2bb355611d9ea397baf85a97da0ba71 |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-29 04:29:08 |
| Source code size: | 234 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 409 / 543 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |