开发者

Change color in java.awt.Image?

开发者 https://www.devze.com 2023-02-14 03:05 出处:网络
I have an java.awt.Image object. It is an colorful image. Here is my code: ImageIcon icon = new ImageIcon(bytes);

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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号