1 | static byte color332toByte(S s) { |
2 | if (l(s) != 3) fail(s); |
3 | ret (byte) ((parseInt(substring(s, 0, 1)) << 5) |
4 | | (parseInt(substring(s, 1, 2)) << 2) |
5 | | parseInt(substring(s, 2))); |
6 | } |
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: | #1022908 |
Snippet name: | color332toByte - see to332String |
Eternal ID of this version: | #1022908/1 |
Text MD5: | f6a63bd405f0c4848b09ec580ce2774b |
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:36:23 |
Source code size: | 192 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 279 / 316 |
Referenced in: | [show references] |