简体   繁体   English

如何在Java中为BufferedImage /图像上色?

[英]How do i colour a BufferedImage/ Image in java?

Sorry, if I asked a question that doesn't make sense, basically i just need a code snippet and possibly an explanation on how to colour in Images in java. 抱歉,如果我问了一个没有道理的问题,基本上我只需要一个代码片段,可能还需要一个有关如何在Java中为Image着色的解释。 (The images are greyscale) (图像为灰度)

So, I'm guessing you want to "tint" the image? 所以,我猜您想“着色”图像吗? If so, see this: 如果是这样,请参见以下内容:

Applying a tint to an image in java 在Java中将色调应用于图像

If you're asking how to restore the color the image would have been if it was made in color, don't even attempt it. 如果您要问如何还原颜色,如果图像是彩色的,那就不要尝试了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM