Skip to content

Commit

Permalink
Merge pull request #44 from Shashank3736/development
Browse files Browse the repository at this point in the history
Update skia-canvas v1.0.0
  • Loading branch information
Shashank3736 committed Aug 13, 2022
2 parents 82b3df8 + 0702da1 commit 67326dc
Show file tree
Hide file tree
Showing 12 changed files with 333 additions and 501 deletions.
10 changes: 10 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ This package versioning work like MAJOR.MINOR.PATCH structure.

All the versions before v2.0.2 works very well but have some very small bugs.

### Versions
#### v1
v1 is created for simple captcha creations. It is only capable of supporting simple customisation.

#### v2
v2 is released with more customisation method and a complete new background coding. It may not be wrong to say that I totally changed the code from v1.

#### v3
v3 is released and I shifted to skia-canvas, also more deeper level customisation is introduced. The whole thing is recoded in Typescript.

## Reporting a Vulnerability

To report a bug or typos. Create an issue with all the details you have regarding that bug with steps to reproduce it. If you know the way to solve it then you can make a pull request with the solution.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# IMPORTANT NOTE
I am not actively working on the project anymore. `v3` have almost all the features I need to make captcha and that's why I decided to stop working on this project from here on. I started this project so that I can create captchas for my discord bots easily. `v3` is still active and working perfectly.

# captcha-canvas
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
Expand All @@ -13,7 +10,7 @@ This is an npm package [captcha-canvas](https://npmjs.com/package/captcha-canvas

#### Captcha Image:

![captcha](https://github.com/Shashank3736/captcha-canvas/raw/master/assets/captcha/default.png)
![captcha](examples/example.png)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FShashank3736%2Fcaptcha-canvas.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FShashank3736%2Fcaptcha-canvas?ref=badge_shield)

### Features
Expand Down
Binary file modified examples/all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/captcha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/dimension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion examples/example.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const { CaptchaGenerator } = require('../js-script');
const { CaptchaGenerator, Captcha } = require('../js-script');

(async () => {
const captcha = new CaptchaGenerator();
Expand All @@ -25,5 +25,16 @@ const { CaptchaGenerator } = require('../js-script');
fs.writeFileSync('./examples/all.png', await captcha.generate());
// console text of captcha
console.log(captcha.text);
// example captcha
const exmCaptcha = new Captcha(600, 200, 8);
exmCaptcha.addDecoy({ total: 20, size: 40 });
exmCaptcha.drawCaptcha({ size: 40 });
exmCaptcha.addDecoy();
exmCaptcha.drawTrace();

exmCaptcha.async = false;
console.log('Example captcha text: ' + exmCaptcha.text);

fs.writeFileSync('./examples/example.png', exmCaptcha.png);
})();

Binary file added examples/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 67326dc

Please sign in to comment.