Java BufferedImage Operation setLuminance(BufferedImage image, int x, int y, float value)

Here you can find the source of setLuminance(BufferedImage image, int x, int y, float value)

Description

set Luminance

License

Apache License

Declaration

public static void setLuminance(BufferedImage image, int x, int y, float value) 

Method Source Code


//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*/
}

Related

  1. setBrightnessFactor(BufferedImage img, float multiple, BufferedImage dest)
  2. setColor(BufferedImage image, int x, int y, int[] color, String colorModel)
  3. setCompressionType(ImageWriteParam param, BufferedImage image)
  4. setImageIntPixels(BufferedImage image, boolean allowDeoptimizingDirectRead, IntBuffer pixels)
  5. setLockImage(BufferedImage image)
  6. setPixel(BufferedImage img, int x, int y, int c)
  7. setPoint(BufferedImage image, int x, int y, int factor, Color color)
  8. showColors(BufferedImage image, boolean alpha, boolean red, boolean green, boolean blue)
  9. shrink(BufferedImage source, double factor)