Edit pixel values

后端 未结 2 727
暗喜
暗喜 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:42

    In BufferedImage: public void setRGB(int x, int y, int rgb)

    Sets a pixel in this BufferedImage to the specified RGB value. The pixel is assumed to be in the default RGB color model, TYPE_INT_ARGB, and default sRGB color space. For images with an IndexColorModel, the index with the nearest color is chosen.

    http://download.oracle.com/javase/6/docs/api/java/awt/image/BufferedImage.html

提交回复
热议问题