Link to home
Start Free TrialLog in
Avatar of nywebsol
nywebsol

asked on

Changing the color of an image

Is there a way to have an image that is allready created be changed in java by passing in the color?
Say I create a circle that is black. Is ther anyway I can change this allready created image's color?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of nywebsol
nywebsol

ASKER

When i mean created, I mean a created jpg made in like photoshop or something
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When i mean created, I mean a created jpg made in like photoshop or something
No need to use JPEGImageDecoder to read a jpeg file.
True! Must have been an involuntary reflex on my part ;-)
The links CEHJ posted show about the only way you can do that to a pre-created image.

Is what you are trying to accomplish along the same lines as your previous posts? I thought you were creating the images yourself???

If this still happens to be the case, you could wrap the image your own class, store the drawing operations you are performing, and just call the same op with a different color. For instance, if you draw a black square, store the op and the rect, poly, line, etc.  If you want to change it to a red square, get the same op/shape and re-perform it with the new color.
it is not an image i create. would be a red circle made in something like photoshop.... be able to read it in and change the red to another color is what i want to do.
The examples i posted are fine for this
okay, so i get the image as a buffered image with the code below and than i should follow steps on this link?
Yep.
If you want to do a whole lot of things with images, check this out: http://www.ia.hiof.no/bildeb/imageprocAPI/.
nywebsol:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept CEHJ's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TimYates
EE Cleanup Volunteer