Libraryless. Click here for Pure Java version (4813L/27K).
1 | // brightness: 0 to 255 |
2 | static RGB rgbFromGrayscale(int brightness) { |
3 | float f = RGB.brightnessToFloat(brightness); |
4 | ret RGB(f, f, f); |
5 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033954 |
Snippet name: | rgbFromGrayscale |
Eternal ID of this version: | #1033954/1 |
Text MD5: | 7a68da6a2e9681f1e17c34b55b9d027f |
Transpilation MD5: | c6befcadff83c29ccd455d24e5302a7d |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-14 23:00:35 |
Source code size: | 142 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 124 / 179 |
Referenced in: | [show references] |