It is building a number which contains the 6th, 7th, 14th, 15th, 22nd and 23rd bits from the original image’s colour. i.e. it is producing a crude 6-bit colour from a 24-bit colour.
e.g.
000000000rrrrrrrrrggggggggbbbbbbbb
becomes the top bits of
rrbbgg
solved java-image processing [closed]