File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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.
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: I want to change colour of image.