Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created June 26, 2019 11:15
Show Gist options
  • Save frogermcs/952aad56d66bfc1818ae6e42cbc95a53 to your computer and use it in GitHub Desktop.
Save frogermcs/952aad56d66bfc1818ae6e42cbc95a53 to your computer and use it in GitHub Desktop.
private byte[] pixelToChannelValuesQuant(int pixel) {
byte[] rgbVals = new byte[3];
rgbVals[0] = (byte) ((pixel >> 16) & 0xFF);
rgbVals[1] = (byte) ((pixel >> 8) & 0xFF);
rgbVals[2] = (byte) ((pixel) & 0xFF);
return rgbVals;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment