Package com.xxl.tool.captcha
Class CaptchaTool.RippleDistorted
java.lang.Object
com.xxl.tool.captcha.CaptchaTool.RippleDistorted
- All Implemented Interfaces:
CaptchaTool.DistortedEngine
- Enclosing class:
- CaptchaTool
public static class CaptchaTool.RippleDistorted
extends Object
implements CaptchaTool.DistortedEngine
波纹效果
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDistortedImage(BufferedImage baseImage) 波纹 1、功能:添加波纹效果 2、原理:波纹效果是通过对图像进行扭曲和变形来实现的。protected voidtransformInverseForRipple(int x, int y, float[] out, float xWavelength, float yWavelength, float xAmplitude, float yAmplitude) 实现波纹扭曲效果 1、接收一个坐标点(x,y)和一系列参数,然后计算出经过波纹扭曲后的新坐标
-
Constructor Details
-
RippleDistorted
public RippleDistorted()
-
-
Method Details
-
getDistortedImage
- Specified by:
getDistortedImagein interfaceCaptchaTool.DistortedEngine
-
rippleFilter
波纹 1、功能:添加波纹效果 2、原理:波纹效果是通过对图像进行扭曲和变形来实现的。波纹效果是通过对图像进行扭曲和变形来实现的。波纹效果是通过对图像进行扭曲和变形来实现的。 -
transformInverseForRipple
protected void transformInverseForRipple(int x, int y, float[] out, float xWavelength, float yWavelength, float xAmplitude, float yAmplitude) 实现波纹扭曲效果 1、接收一个坐标点(x,y)和一系列参数,然后计算出经过波纹扭曲后的新坐标
-