Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.