Calculating rgb vals for BufferedImage

Posted by Hamza Yerlikaya on Stack Overflow See other posts from Stack Overflow or by Hamza Yerlikaya
Published on 2010-03-20T18:16:32Z Indexed on 2010/03/20 18:21 UTC
Read the original article Hit count: 509

I am using following snippet to build a 32 bit integer to use with setRGB of BufferedImage


(bit-or (bit-shift-left a 24)
          (bit-or (bit-shift-left r 16)
              (bit-or (bit-shift-left g 8) b)))

after writing colors reading them back reveals wrong colors is there a fault in my logic?

© Stack Overflow or respective owner

Related posts about clojure

Related posts about bufferedimage