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 Details

    • RippleDistorted

      public RippleDistorted()
  • Method Details

    • getDistortedImage

      public BufferedImage getDistortedImage(BufferedImage baseImage)
      Specified by:
      getDistortedImage in interface CaptchaTool.DistortedEngine
    • rippleFilter

      public BufferedImage rippleFilter(BufferedImage src)
      波纹 1、功能:添加波纹效果 2、原理:波纹效果是通过对图像进行扭曲和变形来实现的。波纹效果是通过对图像进行扭曲和变形来实现的。波纹效果是通过对图像进行扭曲和变形来实现的。
    • transformInverseForRipple

      protected void transformInverseForRipple(int x, int y, float[] out, float xWavelength, float yWavelength, float xAmplitude, float yAmplitude)
      实现波纹扭曲效果 1、接收一个坐标点(x,y)和一系列参数,然后计算出经过波纹扭曲后的新坐标