1 | static RGBImage greenWhiteMarkedImage(RGBImage image, bool[] mark) { |
2 | int w = image.getWidth(), h = image.getHeight(); |
3 | RGBImage i = new RGBImage(w, h); |
4 | for y to h: for x to w: |
5 | i.setPixel(x, y, get(mark, y*w+x) |
6 | ? greenWhiteMarkedImage_color(x, y) |
7 | : image.getInt(x, y)); |
8 | ret i; |
9 | } |
10 | |
11 | static int greenWhiteMarkedImage_color(int x, int y) { |
12 | ret odd(x+y) ? 0xFFFFFF : 0x00FF00; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004897 |
Snippet name: | greenWhiteMarkedImage |
Eternal ID of this version: | #1004897/1 |
Text MD5: | a1932b6128f3a54d49c9c3a7ffa6b7cb |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-15 19:23:18 |
Source code size: | 408 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 622 / 611 |
Referenced in: | [show references] |