Java BufferedImage Color Set changeBrightness(BufferedImage image, int offset)

Here you can find the source of changeBrightness(BufferedImage image, int offset)

Description

Muda o brilho da imagem de acordo com o offset

License

Apache License

Return

image brightness.

Declaration

public static BufferedImage changeBrightness(BufferedImage image, int offset) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.awt.image.BufferedImage;
import java.awt.image.RescaleOp;

public class Main {
    /**/*  w  w  w  .j a v a 2 s  .  c o  m*/
     * Muda o brilho da imagem de acordo com o offset
     * @return image brightness.
     */
    public static BufferedImage changeBrightness(BufferedImage image, int offset) {
        float factor = 1.4f;
        RescaleOp op = new RescaleOp(factor, offset, null);
        BufferedImage brighter = op.filter(image, null);
        return brighter;
    }
}

Related

  1. changeColor(BufferedImage image, Color color, Color replacement_color)
  2. changeColor(BufferedImage image, Color replacement)
  3. changeColor(BufferedImage image, String hexval)
  4. changeRGBSaturation(final BufferedImage image, final double s)