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

7
LINES

< > BotCompany Repo | #1025256 // rgbInt

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

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

static int rgbInt(int r, int g, int b) {
  ret (clamp(r, 0, 255) << 16) | (clamp(g, 0, 255) << 8) | clamp(b, 0, 255);
}

static int rgbInt(byte r, byte g, byte b) {
  ret (ubyteToInt(r) << 16) | (ubyteToInt(g) << 8) | ubyteToInt(b);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025256
Snippet name: rgbInt
Eternal ID of this version: #1025256/5
Text MD5: 6c6783e297234cedfef6263a075330b4
Transpilation MD5: b539119f7479e7fadd8a77a67f6274c8
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-26 03:40:47
Source code size: 240 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 415
Version history: 4 change(s)
Referenced in: [show references]