Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

x2bool/NCaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NCaptcha (.NET CAPTCHA)

License

MIT, for more details see LICENSE file.

Example

Captcha captcha;

// simple way

captcha = new Captcha(new {
    Width = 100, // image width in pixels
    Height = 50, // image height in pixels
    Foreground = "black", // font color; html color (#RRGGBB) or System.Drawing.Color
    Background = Color.White, // background color; html color (#RRGGBB) or System.Drawing.Color
    KeyLength = 5, // key length
    Waves = true, // enable waves filter (distortions)
    Overlay = true // enable overlaying
});

// use builder (more control)

captcha = new Captcha.Builder()
    .Background(myBackground)
    .Keygen(myKeygen)
    .Drawer(myDrawer)
    .Filters(myFilters)
    .Build();

// access key and image

var key = captcha.Key;
var image = captcha.Image;