How to replace colors in BufferedImage in JAVA

后端 未结 4 1867
星月不相逢
星月不相逢 2020-12-16 06:48

I\'m wondering if there is a more efficient method for replacing colors in a BufferedImage. At the moment I use the following method:

I fill an array with colors to

4条回答
  •  借酒劲吻你
    2020-12-16 07:01

    Instead of changing the value of the image pixels you can modify the underlying ColorModel. Much faster that way and no need to iterate over the whole image so it scales well.

提交回复
热议问题