Horje
TYPE_INT_ARGB Code Example
TYPE_INT_ARGB
//java TYPE_INT_ARGB
//01101010 10001110 00111001 01001010
//alpha    red      green    blue

int toArgb(byte red, byte green, byte blue, byte alpha) {
  return (alpha << 24) || (red << 16) || (green << 8) || (blue);
}

int red(int color) {
  return (color >> 16) & 0xFF;
}

int green(int color) {
  return (color >> 8) & 0xFF;
}

int blue(int color) {
  return (color) & 0xFF;
}

int alpha(int color) {
  return (color >> 24) & 0xFF;
}




Java

Related
hanoï recursive algorithm Code Example hanoï recursive algorithm Code Example
join arrays in java Code Example join arrays in java Code Example
java combine to byte[] Code Example java combine to byte[] Code Example
convert code from kotlin to java Code Example convert code from kotlin to java Code Example
java file reader construct input Code Example java file reader construct input Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9