ExNihilo 1.0.0-alpha
See the version list below for details.
dotnet add package ExNihilo --version 1.0.0-alpha
NuGet\Install-Package ExNihilo -Version 1.0.0-alpha
<PackageReference Include="ExNihilo" Version="1.0.0-alpha" />
paket add ExNihilo --version 1.0.0-alpha
#r "nuget: ExNihilo, 1.0.0-alpha"
// Install ExNihilo as a Cake Addin #addin nuget:?package=ExNihilo&version=1.0.0-alpha&prerelease // Install ExNihilo as a Cake Tool #tool nuget:?package=ExNihilo&version=1.0.0-alpha&prerelease
This is an extremely powerful tool for creating procedural images from scratch. You can use it to generate captchas, datasets to train neural networks or unique game mechanics - in other words, for anything your imagination can do
Features
- Multi-container system for processing visual entities without the need for complete redrawing
- Full randomizability of all properties of all entities - from color and font size to the strength of the distortion/blur/any effects
- A huge number of effects for post-processing images - from color correction and geometric distortion, to sharpness and pixelation modifiers
- Ability to write code with confinient fluent interface and the classic object-oriented approach
- Full cross-platform without being tied to any specific operating system
Getting started
For detailed illustrated code examples, we recommend you go to the Wiki section. However, here is a sample:
var fontFamily = new FontCollection()
.AddSystemFonts()
.GetByCulture(CultureInfo.CurrentCulture)
.First();
Size containerSize = new(512, 256);
Container container = new(containerSize)
.WithContainer(
new Container(containerSize)
.WithBackground(Color.White)
.WithVisual(
new Text()
.WithPoint(new Point(256,128))
.WithFontSize(100)
.WithRandomizedContent(content => {
content.WithLength(5);
content.WithCharactersSet(StringProperty.asciiUpperCase);
})
.WithRandomizedBrush(10)
.WithFontFamily(fontFamily)
.WithType(ExNihilo.Utils.VisualType.Filled)
)
);
new ImageSaver(
new ImageGenerator(container)
.WithSeedsCount(3)
.Generate()
)
.WithOutputPath("./")
.CreateFolder("Results")
.Save();
Example projects
You can always find several test projects with detailed code explanations in a directory /examples:
Project | Description | Result |
---|---|---|
SimpleCaptcha | The example shows basic canvas operations such as working with layers, text, generating and saving an image. | |
AdvancedCaptcha | Advanced work with multiple visual objects, randomization of their parameters and post-processing effects | |
MathCaptcha | Creating a simple math captcha with a little distortion effect | |
TwoLanguageCaptcha | This example shows how to create a captcha with different fonts for rendering text in two languages. | |
WPF | This example shows how to create and display image in WPF project. |
License
ExNihilo is licensed under the Apache License, Version 2.0 The licenses of the used libraries can be found here
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- SixLabors.ImageSharp (>= 2.1.3)
- SixLabors.ImageSharp.Drawing (>= 1.0.0-beta15)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.4 | 116 | 1/19/2024 |
1.0.3 | 171 | 11/29/2023 |
1.0.0-alpha | 110 | 10/10/2022 |
First ExNihilo release.