captcha.graphics
Class BinaryImageCreator

java.lang.Object
  extended by captcha.graphics.BinaryImageCreator

public class BinaryImageCreator
extends java.lang.Object

This is a helper class for creating binary images.


Constructor Summary
BinaryImageCreator()
           
 
Method Summary
static byte[] imageToBinary(java.awt.Image a_image)
          Transforms the specified image to our own binary image format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryImageCreator

public BinaryImageCreator()
Method Detail

imageToBinary

public static byte[] imageToBinary(java.awt.Image a_image)
Transforms the specified image to our own binary image format. Every pixel, which is not 100% white, is transformed to black.

Parameters:
a_image - The source image. The image must be 100% in memory already.
Returns:
Our own binary image format. If there was something wrong with the input, null is returned.