| Package | de.popforge.imageprocessing.filters.color |
| Class | public final class GammaCorrection |
| Inheritance | GammaCorrection LUTFilter |
The formula of this filter is new = round( pow( old / 0xff, g ) * 0xff + 0.5 ).
Supported formats:
var filter: GammaCorrection = new GammaCorrection( 2.2, true ); var video: WebCam = new WebCam( 160, 120 ); var image: Image = new Image( 160, 120, ImageFormat.RGB ); image.loadBitmapData( video.getCurrentFrame(), true ); filter.apply( image );
| Property | Defined by | ||
|---|---|---|---|
| gamma : Number
The gamma value from 0.1 to 5.
| GammaCorrection | ||
| Method | Defined by | ||
|---|---|---|---|
|
GammaCorrection(gamma:Number = 2.2, cache:Boolean = true)
Creates a new GammaCorrection object with given gamme value.
| GammaCorrection | ||
|
Applies the filter to the given Image object.
| GammaCorrection | ||
|
toString():String
Builds and returns a string containing the name of the class.
| GammaCorrection | ||
| gamma | property |
public var gamma:Number
The gamma value from 0.1 to 5.
This value has no effect if you set cache to true.
| GammaCorrection | () | constructor |
public function GammaCorrection(gamma:Number = 2.2, cache:Boolean = true)Creates a new GammaCorrection object with given gamme value.
Parametersgamma:Number (default = 2.2) — Set to true if you want to cache the look-up table.
|
|
cache:Boolean (default = true) — The gamma value (0.1 to 5).
|
| apply | () | method |
public override function apply(image:Image):voidApplies the filter to the given Image object.
Parametersimage:Image — The image that will be manipulated.
|
| toString | () | method |
public override function toString():StringBuilds and returns a string containing the name of the class.
ReturnsString — A string containing the name of the class.
|