Leptonica.Managed
1.0.1
dotnet add package Leptonica.Managed --version 1.0.1
NuGet\Install-Package Leptonica.Managed -Version 1.0.1
<PackageReference Include="Leptonica.Managed" Version="1.0.1" />
<PackageVersion Include="Leptonica.Managed" Version="1.0.1" />
<PackageReference Include="Leptonica.Managed" />
paket add Leptonica.Managed --version 1.0.1
#r "nuget: Leptonica.Managed, 1.0.1"
#:package Leptonica.Managed@1.0.1
#addin nuget:?package=Leptonica.Managed&version=1.0.1
#tool nuget:?package=Leptonica.Managed&version=1.0.1
Leptonica.Managed
A fully managed C# implementation of Leptonica 1.87.0, the image processing and image analysis library written by Dan Bloomberg.
- No P/Invoke, no native binaries. Every function is translated to C#, including the image codecs, so the package runs wherever .NET runs.
- The same results as the C library. Leptonica's own regression tests, ported to C#, compare the results with golden files produced by the C library.
- Made for .NET. SIMD, multithreading, and GPU acceleration through ILGPU for some operations when a CUDA or OpenCL device is present; without a GPU everything runs on the CPU.
using Leptonica;
Pix page = Pix.Read("page.jpg");
Pix gray = page.ConvertTo8(false);
Pix flat = gray.BackgroundNormSimple(null, null);
Pix straight = flat.Deskew(0);
straight.OtsuAdaptiveThreshold(200, 200, 0, 0, 0.1f, out _, out Pix binary);
Pix.Write("page-binary.png", binary, L.IFF_PNG);
The C documentation applies: pixDeskew(pixs, 0) is pixs.Deskew(0), pixRead(name) is
Pix.Read(name), output arguments are out parameters and errors are exceptions.
Documentation, the mapping from the C API and benchmarks: github.com/sensboston/Leptonica.Managed.
Leptonica is the work of Dan Bloomberg; this package exists thanks to it. License: BSD 2-Clause, like Leptonica; the licenses of the included codec libraries are in THIRD-PARTY-NOTICES.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ILGPU (>= 1.5.3)
- ILGPU.Algorithms (>= 1.5.3)
-
net8.0
- ILGPU (>= 1.5.3)
- ILGPU.Algorithms (>= 1.5.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.