captcha-canvas
    Preparing search index...

    Class Captcha

    Captcha Generator

    Index

    Constructors

    • Start captcha image creation.

      Parameters

      • Optionalwidth: number = defaultDimension.width

        Width of captcha image.

      • Optionalheight: number = defaultDimension.height

        Height of captcha image.

      • Optionalcharacters: number = ...

        Size of captcha text.

      Returns Captcha

    Properties

    _canvas: Canvas
    _coordinates: number[][]
    _ctx: CanvasRenderingContext2D
    _height: number
    _width: number
    async: boolean

    Accessors

    • get png(): Buffer | Promise<Buffer>

      Get png image of captcha.

      Returns Buffer | Promise<Buffer>

      Get png image of captcha created.

    • get text(): string

      Get Captcha text.

      Returns string

      Get captcha text.

    Methods

    • Draw image on your captcha.

      Parameters

      • image: Image

        Choose image you want to add.

      Returns Captcha