类 ChineseGifCaptcha


public class ChineseGifCaptcha extends ChineseCaptchaAbstract
  • 构造器详细资料

    • ChineseGifCaptcha

      public ChineseGifCaptcha()
    • ChineseGifCaptcha

      public ChineseGifCaptcha(int width, int height)
    • ChineseGifCaptcha

      public ChineseGifCaptcha(int width, int height, int len)
    • ChineseGifCaptcha

      public ChineseGifCaptcha(int width, int height, int len, Font font)
  • 方法详细资料

    • out

      public boolean out(OutputStream os)
      从类复制的说明: Captcha
      验证码输出,抽象方法,由子类实现
      指定者:
      out 在类中 Captcha
      参数:
      os - 输出流
      返回:
      是否成功
    • toBase64

      public String toBase64()
      从类复制的说明: Captcha
      输出base64编码
      指定者:
      toBase64 在类中 Captcha
      返回:
      base64编码字符串
    • getContentType

      public String getContentType()
      从类复制的说明: Captcha
      获取图片类型
      指定者:
      getContentType 在类中 Captcha
      返回:
      图片格式,MIME类型
    • graphicsImage

      private BufferedImage graphicsImage(Color[] fontColor, char[] strs, int flag, int[][] besselXY)
      画随机码图
      参数:
      fontColor - 随机字体颜色
      strs - 字符数组
      flag - 透明度
      besselXY - 干扰线参数
      返回:
      BufferedImage
    • getAlpha

      private float getAlpha(int i, int j)
      获取透明度,从0到1,自动计算步长
      参数:
      i -
      j -
      返回:
      透明度