static Image2B image332to2bByEqualityToColor(Color color, Image332 img) { if (img == null) null; int w = img.getWidth(), h = img.getHeight(); Image2B i2b = new(w, h); int reducedColor = to332_int(color); for y to h: for x to w: if (img.get332Pixel(x, y) == reducedColor) i2b.setPixel(x, y); ret i2b; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023050 |
Snippet name: | image332to2bByEqualityToColor |
Eternal ID of this version: | #1023050/1 |
Text MD5: | f6decb13a7363ea6c6d7d66cf50760a8 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-29 14:19:25 |
Source code size: | 332 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 293 / 334 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |