Hi All,
I am using BufferedImage.setRGB() to set the color of a pixel in the image. I have a function which calculates which color to be given to that pixel and then the hex string like
0x0000ff00
is returned.
I want to use this string in setRGB(). thus i used
buffImage.setRGB(j, i ,Integer.decode(getRGBHexString(pixelVal)).intValue());
to color the pixel .But this is not giving me the desired output.
As the integer value of the hex string is more, the pixel is painted as black.
But if I use the same hexString as below its giving the correct color.
buffImage.setRGB(j, i ,0x00a0a0a0);
Please help me and also tell me if there is any other way to do the same thing.