com.octo.captcha.component.image.deformation
Class PuzzleImageDeformation

java.lang.Object
  extended by com.octo.captcha.component.image.deformation.PuzzleImageDeformation
All Implemented Interfaces:
ImageDeformation

public class PuzzleImageDeformation
extends java.lang.Object
implements ImageDeformation

Deformation where the image is divided in little squares, moved individualty in a random position. Each move is really light, in order to let the captcha readble.


Constructor Summary
PuzzleImageDeformation(int colNum, int rowNum, double maxAngleRotation)
          Conststruct a PuzzleImageDeformation, with the numbers of colums and rows.
 
Method Summary
 java.awt.image.BufferedImage deformImage(java.awt.image.BufferedImage image)
          Deforms an image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PuzzleImageDeformation

public PuzzleImageDeformation(int colNum,
                              int rowNum,
                              double maxAngleRotation)
Conststruct a PuzzleImageDeformation, with the numbers of colums and rows. If manageRowAndColRandomly is set to true, the numbers of rows and colums are choosed between 1 and colNum/rowNum

Parameters:
colNum - Number of colums to divide the image, max number if rows and colums are managed randomly
rowNum - Number of rows to divide the image, max number if rows and colums are managed randomly
maxAngleRotation - Maximal angle of rotation for each square.
Method Detail

deformImage

public java.awt.image.BufferedImage deformImage(java.awt.image.BufferedImage image)
Description copied from interface: ImageDeformation
Deforms an image

Specified by:
deformImage in interface ImageDeformation
Parameters:
image - the image to be deformed
Returns:
the deformed image


Copyright 2003-2009 JCaptcha. All Rights Reserved.