Packagede.popforge.imageprocessing.filters.color
Classpublic final class GrayscaleY
InheritanceGrayscaleY Inheritance Grayscale

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

The formula of this filter is y = red * 0.299 + green * 0.587 + blue * 0.114.

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


Example
  
  // Set the conversion filter to GrayscaleY
  Image.grayscale = new GrayscaleY();
  
  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 GrayscaleY object.
GrayscaleY
 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.
GrayscaleY
Constructor detail
GrayscaleY()constructor
public function GrayscaleY()

Creates a new GrayscaleY 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.