1.0.0 • Published 9 months ago

captcha-generator-md v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

captcha-generator

Use this program to generate your own captcha image from string

Usage

Import the package and use the function:

const captcha = require('captcha-generator')
const callback = (buffer) => {
    console.log(buffer)
}
captcha("<your string>", callback)

Additonally this function can take another argument with the following params:

const params = {
    offset: int,
    height: int,
    out_name: string,
    img_overlap_min: float,
    img_overlap_max: float,
    back_color: string,
    out_to_img, boolean
}
  • offset: pixel value for the right and left offset of generated image
  • height: pixel value of image height
  • out_name : name for output file ex. captcha
  • img_overlap : min and max values that define overlaping of image characters. Values from 0 to 1
  • back_color: : background color of image
  • out_to_img: : checks if output image will be saved

License

This project is licensed under the MIT License

Dependencies

Jimp ^0.22.10

1.0.0

9 months ago