| Package | de.popforge.imageprocessing.filters.noise |
| Class | public final class Pixelate |
| Implements | IFilter |
This filter smooths an image down using a BitmapData and then scales it up. This is done native because of BitmapData.draw().
Supported formats:
var filter: Pixelate = new Pixelate(); var video: WebCam = new WebCam( 160, 120 ); var image: Image = new Image( 160, 120, ImageFormat.GRAYSCALE ); image.loadBitmapData( video.getCurrentFrame(), true ); filter.apply( image );
| Method | Defined by | ||
|---|---|---|---|
|
Pixelate(size:int = 2)
Creates a new Pixelate object.
| Pixelate | ||
|
Applies the filter to the given Image object.
| Pixelate | ||
|
toString():String
Builds and returns a string containing the name of the class.
| Pixelate | ||
| Pixelate | () | constructor |
public function Pixelate(size:int = 2)Creates a new Pixelate object. The scale indicates how the pixels will be scaled up. A scale of 2 doubles each pixel.
Parameterssize:int (default = 2) — The scale of the pixelate effect. Must be greater than zero.
|
| apply | () | method |
public function apply(image:Image):voidApplies the filter to the given Image object.
Parametersimage:Image — The image that will be manipulated.
|
| toString | () | method |
public function toString():StringBuilds and returns a string containing the name of the class.
ReturnsString — A string containing the name of the class.
|