Packagede.popforge.imageprocessing.filters.color
Classpublic final class GrayscaleBT709
InheritanceGrayscaleBT709 Inheritance Grayscale

The GrayscaleBT709 class transforms a RGB/RGBA image into grayscale using BT709 algorithm.

The formula of this filter is y = red * 0.2125 + green * 0.7154 + blue * 0.0721.

Supported formats:
This is a conversion filter so there are no supported formats.


Example
  
  // Set the conversion filter to GrayscaleBT709
  Image.grayscale = new GrayscaleBT709();
  
  var video: WebCam = new WebCam( 160, 120 );
  var image: Image = new Image( 160, 120, ImageFormat.GRAYSCALE );
  
  image.loadBitmapData( video.getCurrentFrame(), true );
  



Public Methods
 MethodDefined by
  
Creates a new GrayscaleBT709 object.
GrayscaleBT709
 Inherited
apply(image:Image):void
Applies the filter to the given Image object.
Grayscale
  
toString():String
Builds and returns a string containing the name of the class.
GrayscaleBT709
Constructor detail
GrayscaleBT709()constructor
public function GrayscaleBT709()

Creates a new GrayscaleBT709 object.

Method detail
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.