Versions in this module Expand all Collapse all v1 v1.0.1 Sep 21, 2023 v1.0.0 Sep 21, 2023 Changes in this version + const MimeJpeg + const MimeJpg + const MimePng + const TypeSlide + const TypeWordsZhCn + var DefaultSlide = NewSlide("", "", 70) + var ErrFormat = errors.New("mime format unsupported") + type Captcha interface + Check func(dots string, dct map[int]Dot, span int) bool + Create func() (dots map[int]Dot, b64 string, thumb64 string, key string, err error) + func NewWithOptions(tp uint8, opts ...Option) Captcha + type Dot struct + Dx int + Dy int + Height int + Index int + Width int + type Option func(opt *options) + func WithDriver(driver *captcha.Captcha) Option + func WithQuality(quality int) Option + func WithSlideBackDir(backDir string) Option + func WithSlideMaskDir(maskDir string) Option + func WithWordsZhBackImgList(backImgList []string) Option + func WithWordsZhCnChars(chars []string) Option + func WithWordsZhCnImgSize(size captcha.Size) Option + func WithWordsZhCnThumbSize(size captcha.Size) Option + type Slide struct + func NewSlide(backDir, maskDir string, quality int) *Slide + func SlideWithBack(backDir string) *Slide + func SlideWithMask(maskDir string) *Slide + func (s *Slide) Check(dots string, dct map[int]Dot, span int) bool + func (s *Slide) Create() (dots map[int]Dot, b64 string, thumb64 string, key string, err error) + func (s *Slide) CreateCustom(r, quality int) (dots map[int]Dot, b64 string, thumb64 string, key string, err error) + func (s *Slide) CreateShape(img *image.RGBA, point image.Point, r int) *image.RGBA + type WordsZhCn struct + func NewWordsZhCn(driver *captcha.Captcha) *WordsZhCn + func (wzc *WordsZhCn) Check(dots string, dct map[int]Dot, span int) bool + func (wzc *WordsZhCn) Create() (dots map[int]Dot, b64 string, thumb64 string, key string, err error) + func (wzc *WordsZhCn) Driver() *captcha.Captcha