Packagede.popforge.imageprocessing.filters.render
Classpublic final class Blobs
ImplementsIFilter

The Blobs class is a filter that renders random blobs on an image. First the blobs will be generated with random values based on the randomSeed. After that all blobs will be rendered on the image. This filter works also on binary images to generate binary large objects.

This filter is based on a technique from toxie^ainc. and the C++ implementation from Hopper.

Supported formats:


Example
  
  var filter: Blobs = new Blobs( 0xfff, 8 );
  
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  filter.apply( image );
  

See also

apocalypse inc.


Public Methods
 MethodDefined by
  
Blobs(randomSeed:int = -1, numBlobs:int = 4)
Creates a new Blobs object.
Blobs
  
apply(image:Image):void
Applies the filter to the given Image object.
Blobs
  
toString():String
Builds and returns a string containing the name of the class.
Blobs
Constructor detail
Blobs()constructor
public function Blobs(randomSeed:int = -1, numBlobs:int = 4)

Creates a new Blobs object.

Parameters
randomSeed:int (default = -1) — The random seed number to use. If you keep all other parameters the same, you can generate different pseudo-random results by varying the random seed value. The Blobs function is a mapping function, not a true random-number generation function, so it creates the same results each time from the same random seed.
 
numBlobs:int (default = 4) — The amount of blobs inside the image.
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.
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.