static RGBImage greenWhiteMarkedImage(RGBImage image, bool[] mark) { int w = image.getWidth(), h = image.getHeight(); RGBImage i = new RGBImage(w, h); for y to h: for x to w: i.setPixel(x, y, get(mark, y*w+x) ? greenWhiteMarkedImage_color(x, y) : image.getInt(x, y)); ret i; } static int greenWhiteMarkedImage_color(int x, int y) { ret odd(x+y) ? 0xFFFFFF : 0x00FF00; }
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: | 851 / 833 |
| Referenced in: | [show references] |