Convert int RGB to Byte
Hallo,
I have a byte array where colors are stored: 1 field R, 2 field G, 3 field B, 4 field R, 5 field G, 6 field B and so on.
The byte range goes from -128 to 127 (of course).
Now I want to store RGB values (range from 0 to 255) into this byte array.
I tried something like bytearray[0] = (byte)mycolor.getRed()/2 but with this method the color gets much darker.
Is there an algorithm to solve this problem?
Thank you,

