Skip to content
LeaFrockPublic

About

Generate captcha images based on .NET

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

CaptchaN

Image Demo

Generate captcha images based on dotNET.

用于生成图形验证码的开源.NET库。

.NET 10 License

Packages |Nuget包

Name Description NugetPackage
CaptchaN.Abstractions Abstractions module CaptchaN.Abstractions
CaptchaN.Drawing.SkiaSharp Powered by SkiaSharp CaptchaN.Drawing.SkiaSharp
CaptchaN.Drawing.ImageSharp Powered by ImageSharp CaptchaN.Drawing.ImageSharp
CaptchaN.Drawing.ImageMagick Powered by Magick.NET CaptchaN.Drawing.ImageMagick

QuickStart |快速入门

Choose an underlying drawing engine you like | 选择一个你想用的绘图引擎

dotnet add package CaptchaN.Drawing.SkiaSharp

dotnet add package CaptchaN.Drawing.ImageSharp

dotnet add package CaptchaN.Drawing.ImageMagick

Wiki & samples | 维基和代码示例

using CaptchaN.Abstractions;
using CaptchaN.Drawing.SkiaSharp;

builder.Services.AddCaptchaN()
    .AddDefaultCodeTextGenerator()
    .AddPaintConfig(builder.Configuration.GetSection(nameof(PaintConfig)))
    .AddSkiaSharpPainter(builder.Configuration.GetSection("SkiaSharpPainter"));

// Tell CaptchaN where to load & use the font files
Fonts.UseDirectoryFonts(new(Path.Combine(builder.Environment.ContentRootPath, "Fonts")));

Please see Wiki and Samples for details.

Contribution |贡献

Issues and pull requests are welcomed if you have any questions!

如果您有任何疑问,欢迎提交Issue和PR!

About

Generate captcha images based on .NET

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages