Tz.Structure.Sketching 0.2.54

dotnet add package Tz.Structure.Sketching --version 0.2.54
NuGet\Install-Package Tz.Structure.Sketching -Version 0.2.54
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tz.Structure.Sketching" Version="0.2.54" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tz.Structure.Sketching --version 0.2.54
#r "nuget: Tz.Structure.Sketching, 0.2.54"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Tz.Structure.Sketching as a Cake Addin
#addin nuget:?package=Tz.Structure.Sketching&version=0.2.54

// Install Tz.Structure.Sketching as a Cake Tool
#tool nuget:?package=Tz.Structure.Sketching&version=0.2.54

Structure.Sketching

Windows Build Status

Linux Build Status

Structure.Sketching is an image processing library targeting the .NET LTS, currently 6.0. It is in beta. The namespaces may be adjusted as it is cleaned up for production, but otherwise it should be fairly safe to use.

Supported Formats/Filters

Currently the library supports the following file types:

  • JPG
  • BMP - Reading: 32bit, 24bit, 16bit, 8bit, 8bit RLE, 4bit, and 1bit. Writing: 24bit
  • PNG - Reading: RGB, RGBA, Greyscale, Greysale+alpha, Palette. Writing: RGBA
  • GIF - Includes animation support

There are also a number of filters within the library for a number of different purposes:

  • Contrast stretching
  • Gamma correction
  • HSV and RGB equalization
  • Adaptive HSV and RGB equalization
  • Kuwahara smoothing
  • Median smoothing
  • SNN Blur
  • Image resizing
  • Image cropping
  • Canvas resizing
  • Image flipping
  • Affine transformations including:
    • Rotatation
    • Scaling
    • Skewing
    • Translatation
  • Image resizing and affine transformations can use the following resampling filters:
    • Bell
    • Bicubic
    • Bilinear
    • Box
    • Catmull Rom
    • Cosine
    • Cubic B Spline
    • Cubic Convolution
    • Hermite
    • Lanczos3
    • Lanczos8
    • Mitchell
    • Nearest Neighbor
    • Quadratic B Spline
    • Quadratic
    • Robidoux
    • Robidoux Sharp
    • Robidoux Soft
    • Triangle
  • Bump map generation
  • Canny Edge Detection
  • Gaussian Blur
  • Lomograph
  • Normal map generation
  • Polaroid
  • Image blending
  • Glow
  • Vignette
  • Constrict
  • Dilate
  • Unsharp
  • Box Blur
  • Embossing
  • Edge detection techniques including:
    • Kayyali
    • Kirsh
    • Laplace Edge Detection
    • Laplacian of Gaussian Edge Detection
    • Prewitt
    • Roberts Cross
    • Robinson
    • Scharr
  • Sharpen
  • Sharpen Less
  • Sobel Embossing
  • Alpha manipulation
  • Black and White
  • Blue, green, and red filters
  • Brigtness manipulation
  • Contrast manipulation
  • Greyscale 601 and 709
  • Hue manipulation
  • Kodachrome
  • Saturation
  • Sepia Tone
  • Temperature
  • Color blindness filters including:
    • Achromatomaly
    • Achromatopsia
    • Deuteranomaly
    • Deuteranopia
    • Protanomaly
    • Protanopia
    • Tritanomaly
    • Tritanopia
  • Adaptive Threshold
  • Non Maximal Suppression
  • Threshold
  • Image addition, subtraction, division, multiplication, modulo, and, or, and xor functions.
  • Turbulence
  • Solarize
  • Sin Wave
  • Posterize
  • Pointillism
  • Pixellate
  • Noise
  • Logarithm
  • Jitter
  • Color replacement
  • Color inversion
  • There are also generic classes for color matrix (using a 5x5 matrix), affine transformations, and convolution filters.

There are also a couple of other items in here including:

  • Perlin Noise generation
  • The library also includes the ability to draw lines, rectangles, and ellipses, both filled and the outline.
  • Image to ASCII art
  • Image to Base64 string

That said hopefully the list will grow with time.

Usage

The library is quite straightforward to use:

new Image("ExampleImage.jpg")
	.Apply(new CannyEdgeDetection(Color.Black, Color.White, .9f, .1f))
	.Save("ExampleImage2.jpg");

The Image class is designed with a fluent interface, offering flexibility in loading images. You can provide the source as a string pointing to a file, a stream, or a byte array. Additionally, you can specify the dimensions (width and height) when creating a blank image.

The Apply function allows you to apply a filter to the image. You have the option to define a rectangle as the second parameter, restricting the filter's effect to a specific portion of the image.

The Save function offers flexibility in saving images. You have the option to either specify a file name or a stream. Additionally, you can define the desired file format using an enum, allowing you to save the image in your preferred format.

For wiki documentation... akan datang (coming soon).

Installation

To install it run the following command in the Package Manager Console:

Install-Package Tz.Structure.Sketching

Credits

Originally by James Craig

License

Structure.Sketching is released under the Apache 2.0 license.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

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
0.2.54 251 2/1/2024
0.2.49 474 10/30/2023
0.2.46 413 10/27/2023
0.2.43 403 10/25/2023
0.2.42 355 10/25/2023
0.2.40 429 10/23/2023

This is the beta release of the project. While the general functionality is set the classes themselves may change namespaces and some minor functionality may be added prior to 1.0 release.