Here you can find the source of setLuminance(BufferedImage image, int x, int y, float value)
public static void setLuminance(BufferedImage image, int x, int y, float value)
//package com.java2s; //License from project: Apache License import java.awt.Color; import java.awt.image.BufferedImage; public class Main { public static void setLuminance(BufferedImage image, int x, int y, float value) { image.setRGB(x, y, new Color(value, value, value).getRGB()); }/*from w w w .j a va 2 s.co m*/ }