hello,
i'm doing a project related to steganography and i need to know if there is any possible way to alter the value of red color of a pixel and keep other two(i.e green and blue) unaltered.. please help.. very much in need,

regards,
Pruthvi kumar

Hi
Yes it is 100% possible. I have done this before that is why i am very sure about it. For a start read an image into a bufferedImage when you have that image, you can alter any colour of pixel. You might face a problem where you get the RGB (red,green,blue) value as one long integer and you have separate it using shifting bit operators or some other algorithm i used bit shifting. I hope this helps :]

Hi
Yes it is 100% possible. I have done this before that is why i am very sure about it. For a start read an image into a bufferedImage when you have that image, you can alter any colour of pixel. You might face a problem where you get the RGB (red,green,blue) value as one long integer and you have separate it using shifting bit operators or some other algorithm i used bit shifting. I hope this helps :]

Hello,

before anything else i thank you very much for showing interest in my query and trying to help. I understand what you've told and i must tell you i did do shifting and got individual values for RG&B .Now whats the line question is how to manipulate those values say for example i need to change only blue value of a pixel and keep other two color's values unaltered and reflect the changes in the image. I need help in this regard. Can u please help.It'l be a great favor. Hope to see your response at the earliest.Very much in need

Many Thanks,
Pruthvi kumar

what do you need help with?
just write the software you think should do the trick, if it doesn't work, show it here, tell us what exception-, errormessages, ... you get and where you 're stuck.

do not expect us to write a class or method that will instantly do what you want to achieve.

Yes why not that is easy as well, the way you splitted the bits you can join them together as well.

For example
if x[0] = 0x30; Red
x[1] = 0xFF;
X[2] = 0XFF;

Final Array will be:
x = x[0]*10000 + x[1]*100+x[2];
x = 300000 + FF00 + FF;
x = 30FFFF; here is your RGB value.

And as you are still working on it, just make sure its 'RGB' not 'RBG'. Because according to what i remember java gave me 'RBG' just recheck it. Hope this helps

Yes why not that is easy as well, the way you splitted the bits you can join them together as well.

For example
if x[0] = 0x30; Red
x[1] = 0xFF;
X[2] = 0XFF;

Final Array will be:
x = x[0]*10000 + x[1]*100+x[2];
x = 300000 + FF00 + FF;
x = 30FFFF; here is your RGB value.

And as you are still working on it, just make sure its 'RGB' not 'RBG'. Because according to what i remember java gave me 'RBG' just recheck it. Hope this helps

Hey buddy i owe u big one man.. that gave me some basic idea.. I'll work on it.. Thank you so much.If i get stuck up somewhere i ll ask for help.. Hope you'll not mind.. Thanks a lot again.
Pruthvi kumar

what do you need help with?
just write the software you think should do the trick, if it doesn't work, show it here, tell us what exception-, errormessages, ... you get and where you 're stuck.

do not expect us to write a class or method that will instantly do what you want to achieve.

Hello sir,
I never asked for the whole chunk of code to be written. All i needed to know is that how to change the color values of pixels in an image. I am doing rest pretty well. I got stuck up while it came to changing color values. So i asked for help in that context.

Thanks,
Pruthvi Kumar

Hey buddy i owe u big one man.. that gave me some basic idea.. I'll work on it.. Thank you so much.If i get stuck up somewhere i ll ask for help.. Hope you'll not mind.. Thanks a lot again.
Pruthvi kumar

No problem :]

progams on error exception handling

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.