// color = 0 to 255 static int pixelsWith332Color(RGBImage img, int color) { int count = 0; for (int rgb : img.pixels) if (to332(rgb) == (byte) color) ++count; ret count; } // color = e.g. "053" static int pixelsWith332Color(RGBImage img, S color) { ret pixelsWith332Color(img, color332toByte(color)); }
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: | #1022907 |
Snippet name: | pixelsWith332Color |
Eternal ID of this version: | #1022907/2 |
Text MD5: | 9ed6d2aeed9b487d12fa08939394bca7 |
Author: | stefan |
Category: | javax / image analysis |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-14 20:34:47 |
Source code size: | 334 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 279 |
Version history: | 1 change(s) |
Referenced in: | [show references] |