1.0.2 • Published 3 years ago
captcha-module v1.0.2
Examples for Captcha
const {Captcha} = require("captcha-module");
const fs = require("fs");
const testCaptcha = new Captcha();
testCaptcha.get() // Get the captcha string
testCaptcha.controll("3213") // Controll captcha with a string
const buffer = testCaptcha.getCanvas({
background_color: "YELLOW", //İf not set will be random color
textColor: "GREEN" // if not set will be "WHITE"
}) // Get the canvas buffer
fs.writeFileSync('./image.png', buffer); // Writes the buffer to the PNG file