net.sourceforge.jiu.color.adjustment
Class Brightness
java.lang.Object
net.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.ops.ImageToImageOperation
net.sourceforge.jiu.ops.LookupTableOperation
net.sourceforge.jiu.color.adjustment.Brightness
- public class Brightness
- extends LookupTableOperation
Adjusts the brightness of an image.
The amount of adjustment is given to the constructor as a percentage value between -100 and 100.
-100 will make the resulting image black, 0 will leave it unchanged, 100 will make it white.
Usage example
This code snippet will increase image
's brightness by 30 percent.
Brightness brightness = new Brightness();
brightness.setInputImage(image);
brightness.setBrightness(30);
brightness.process();
PixelImage adjustedImage = brightness.getOutputImage();
- Author:
- Marco Schmidt
Method Summary |
void |
process()
This method does the actual work of the operation.
|
void |
setBrightness(int newBrightness)
Sets the brightness adjustment value in percent (between -100 and 100). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Brightness
public Brightness()
process
public void process()
throws MissingParameterException,
WrongParameterException
- Description copied from class:
Operation
- This method does the actual work of the operation.
It must be called after all parameters have been given to the operation object.
- Overrides:
process
in class LookupTableOperation
- Throws:
MissingParameterException
WrongParameterException
setBrightness
public void setBrightness(int newBrightness)
- Sets the brightness adjustment value in percent (between -100 and 100).
- Parameters:
newBrightness
- the amount of change to be applied to the brightness of the input image
- Throws:
IllegalArgumentException
- if the argument is smaller than -100 or larger than 100
Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt