convert ushort[] grayscale values to byte[]
Question
I have uhort[]
values in the format 0-65536
. But I need this grayscale values in byte form!
How can I convert my ushort values in byte values?
Thanks
Solution
byte value = (byte)(array[index] >> 8);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow