Edit pixel values

后端 未结 2 705
暗喜
暗喜 2021-01-05 11:04

How to edit pixel values of an image in Java. Is there any method to change pixel values?

2条回答
  •  悲&欢浪女
    2021-01-05 11:51

    For example:

    BufferedImage image = ...
    image.setRGB(x, y, 0);
    

    From documentation:

     void setRGB(int x, int y, int rgb)
     //Sets a pixel in this BufferedImage to the specified RGB value.
    

提交回复
热议问题