This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes I want to change colour of image. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "I want to change colour of image." Watch "I want to change colour of image." New topic
Author

I want to change colour of image.

Huzefa Zohaib
Ranch Hand

Joined: Nov 21, 2001
Posts: 40
I want to change the colour of the particular thing during the coping process.
For Example:
There is a bmp in which a man is standing wearing a sky blue shirt and a navy blue pent in front of the blue car.
I can copy the image by the following code.

Now, I want that when I open the copied image, the blue colour of the car in the image
turns black.
How can I do this.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

  • If you are going to be using .BMP images, you'll have to use the JAI (Java Advanced Imageing) API.
  • Is this image a photograph or a drawing? Is more than one color used in the blue of the car? Is the "blue" of the shirt a different "blue" (RGB value) from the man's shirt?
  • Image filters are good at things like "find all colors of this RGB value and replace them with colors of another RGB value", but are bad at "find the car in this picture, ignore the man standing in front of it, and change these multiple shades of blue to multiple shades of black".


  • -Nate
    Write once, run anywhere, because there's nowhere to hide! - /. A.C.
     
     
    subject: I want to change colour of image.
     
    Similar Threads
    copying file into database
    how to zip multiple files and directory into one output
    how to copy a file from one folder to another folder?
    Merge and split file
    Why picture is not being copy