Packagede.popforge.imageprocessing.filters.color
Classpublic class LUTFilter
ImplementsIFilter
SubclassesBrightnessCorrection, ContrastCorrection, Curves, Extract, GammaCorrection, Invert, LevelsCorrection

The LUTFilter class is a basic filter used for most look-up table based operations.

The formula of this filter is new = lut[ old ].

Supported formats:



Protected Properties
 PropertyDefined by
  cache : Boolean
The caching value.
LUTFilter
  tables : Array
The look-up tables stored in an array.
LUTFilter
Public Methods
 MethodDefined by
  
LUTFilter(cache:Boolean = false)
Creates a new LUTFilter object.
LUTFilter
  
apply(image:Image):void
Applies the filter to the given Image object.
LUTFilter
  
toString():String
Builds and returns a string containing the name of the class.
LUTFilter
Protected Methods
 MethodDefined by
  
buildTables(image:Image):void
This function creates the amount of necessary look-up tables.
LUTFilter
  
getArray():Array
Creates a new look-up table.
LUTFilter
Property detail
cacheproperty
protected var cache:Boolean

The caching value. Caching is enabled if cache is set to true.

tablesproperty 
protected var tables:Array

The look-up tables stored in an array.

Constructor detail
LUTFilter()constructor
public function LUTFilter(cache:Boolean = false)

Creates a new LUTFilter object. If you set cache to true the tables will be cached and only created once.

Parameters
cache:Boolean (default = false) — Set to true if you only want to create the tables once.
Method detail
apply()method
public function apply(image:Image):void

Applies the filter to the given Image object.

Parameters
image:Image — The image that will be manipulated.
buildTables()method 
protected function buildTables(image:Image):void

This function creates the amount of necessary look-up tables.

Parameters
image:Image — The image that will be manipulated.

Throws
InvalidImageFormatError — When the ImageFormat is not supported.
getArray()method 
protected function getArray():Array

Creates a new look-up table.

Returns
Array — A general look-up table from 0x00 to 0xff.
toString()method 
public function toString():String

Builds and returns a string containing the name of the class.

Returns
String — A string containing the name of the class.