Packagede.popforge.imageprocessing.filters.color
Classpublic final class Curves
InheritanceCurves Inheritance LUTFilter

The Curves class is a filter that applies a curve to a given image. This curve has to be defined before. In general the curve of the image before transforming it goes from (0x00|0x00) to (0xff|0xff) in a linear way. This means every value from 0x00 to 0xff for the color is mapped with the function f(x) = x.

The curves filter replaces this and each color value will be calculated using f(x) = curve(x).

Supported formats:


Example
  
  var curve: Curve = new Curve();
  curve.addPoint( new Point( 0x40, 0x80 ) );
  
    var filter: Curves = new Curves( curve );
  
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  filter.apply( image );
  

See also

de.popforge.imageprocessing.geom.Curve


Protected Properties
 PropertyDefined by
 Inheritedcache : Boolean
The caching value.
LUTFilter
 Inheritedtables : Array
The look-up tables stored in an array.
LUTFilter
Public Methods
 MethodDefined by
  
Curves(curve:Curve, cache:Boolean = true)
Curves
  
apply(image:Image):void
Curves
 Inherited
toString():String
Builds and returns a string containing the name of the class.
LUTFilter
Protected Methods
 MethodDefined by
 Inherited
buildTables(image:Image):void
This function creates the amount of necessary look-up tables.
LUTFilter
 Inherited
getArray():Array
Creates a new look-up table.
LUTFilter
Constructor detail
Curves()constructor
public function Curves(curve:Curve, cache:Boolean = true)Parameters
curve:Curve
 
cache:Boolean (default = true)
Method detail
apply()method
public override function apply(image:Image):voidParameters
image:Image