[Need help] Hex in java
Link |
by Atsuku(binku)
on 2009-10-25 00:46:31
|
return (rgb & 0xff00ffff) <--- return type is int I found this : Integer.toHexString(int); I try to (rgb & Integer.toHexString(int)) but it won't 'and' String value. I need to do manipulating image. Dareka.. tasukete... >_< |
Re: [Need help] Hex in java
Link |
by
on 2009-10-25 15:28:58 (edited 2009-10-25 15:30:02)
|
Integer.toHexString() returns a string. You can't perform the mathematical AND operation on a string! What are you trying to do, actually? If you want readable hex of just the one color channel: return Integer.toHexString(rgb & 0xFF00FFFF); |
Re: [Need help] Hex in java
Link |
by Atsuku(binku)
on 2009-10-28 02:28:28
|
Actually, i want to edit each pixel's RGB value. So something like, i took one pixel in some coordinate, i get the RGB value of it, and then increase/decrease the value of green for example(ex. found green's value = a3, increase it to max = ff or dd, (i use JSlider for each RGB, and alpha too). And then return it to appropriate method for image filtering. Sore de. ^^ |
Re: [Need help] Hex in java
Link |
by
on 2009-10-28 02:40:19
|
You will want to use the class PixelGrabber. |