Harry Joy
Harry Joy

Reputation: 59694

Change color in java.awt.Image?

I have an java.awt.Image object. It is an colorful image. Here is my code:

ImageIcon icon = new ImageIcon(bytes);
Image image = icon.getImage();

How can I make it black & white?

Upvotes: 0

Views: 1866

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168845

Look into using a BufferedImageOp. See Drawing an Image in the Java Tutorials for more details.

Upvotes: 2

Related Questions