On Tue, 17 Feb 2026 20:32:24 GMT, Sergey Bylokhov <[email protected]> wrote:
>>> > int expR = (argb >>> 16); >>> > You can still use >>> for other components, >>> >>> it does not work for others, it works only for alpha. >> >> No, it doesn't work without `& 0xFF`. >> >> How can this not work? >> >> >> int expR = (argb >>> 16) & 0xFF; >> int expG = (argb >>> 8) & 0xFF; > >>No, it doesn't work without & 0xFF. > > Initially, you suggested it without &FF, and my answer was about the text I > quoted. > >> int expG = (argb >>> 8) & 0xFF; > > That is not necessary to use >>> shift for red and green, as well as >> plus > &FF for blue. Not necessary, but using `>>>` doesn't change the result, and using the same operator in all the three cases looks *consistent*. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29734#discussion_r2818961050
