Packagede.popforge.imageprocessing.filters.color
Classpublic final class Invert
InheritanceInvert Inheritance LUTFilter

The Invert class is a filter that inverts the colors of an image. This is a look-up table based filter.

The formula of this filter is new = 0xff - old.

Supported formats:


Example
  
  var filter: Invert = new Invert();
  
  var video: WebCam = new WebCam( 160, 120 );
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  image.loadBitmapData( video.getCurrentFrame(), true );
  
  filter.apply( image );
  



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
  
Creates a new Invert object.
Invert
  
apply(image:Image):void
Applies the filter to the given Image object.
Invert
  
toString():String
Builds and returns a string containing the name of the class.
Invert
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
Invert()constructor
public function Invert()

Creates a new Invert object.

Method detail
apply()method
public override function apply(image:Image):void

Applies the filter to the given Image object.

Parameters
image:Image — The image that will be manipulated.
toString()method 
public override function toString():String

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

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