Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

3
LINES

< > BotCompany Repo | #1033303 // brightnessToRGBA [0..255]

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (47L/1K).

static int brightnessToRGBA(int brightness) {
  ret 0xFF000000 | clamp(brightness, 0, 255)*0x010101;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033303
Snippet name: brightnessToRGBA [0..255]
Eternal ID of this version: #1033303/2
Text MD5: 3b2f381616f30e626587b24888cf953d
Transpilation MD5: 36350b23ab2179eaf9c97914cb515a38
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-20 02:42:06
Source code size: 104 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 172 / 244
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)