Hawkynt.ImageTransformUI
1.0.0.11
dotnet add package Hawkynt.ImageTransformUI --version 1.0.0.11
NuGet\Install-Package Hawkynt.ImageTransformUI -Version 1.0.0.11
<PackageReference Include="Hawkynt.ImageTransformUI" Version="1.0.0.11" />
<PackageVersion Include="Hawkynt.ImageTransformUI" Version="1.0.0.11" />
<PackageReference Include="Hawkynt.ImageTransformUI" />
paket add Hawkynt.ImageTransformUI --version 1.0.0.11
#r "nuget: Hawkynt.ImageTransformUI, 1.0.0.11"
#:package Hawkynt.ImageTransformUI@1.0.0.11
#addin nuget:?package=Hawkynt.ImageTransformUI&version=1.0.0.11
#tool nuget:?package=Hawkynt.ImageTransformUI&version=1.0.0.11
Hawkynt.ImageTransformUI
Shared WinForms image-transformation UI for interactive color reduction, with live preview and registry-driven quantizer/ditherer selection.
π¦ Installation
dotnet add package Hawkynt.ImageTransformUI
The package targets net48, net8.0-windows, and net10.0-windows and requires WinForms.
β¨ Features
ReduceColorsWindowmodal color-reduction dialog.- Registry-backed choice of 40+ quantizers and 120+ ditherers from
FrameworkExtensions.System.Drawing. - Palette-size control from 2 to 256 colors.
- Debounced asynchronous live preview with cancellation.
ForcePaletteSize(int)for formats that require a fixed palette cardinality.- Shared text-mode/font picker support through
FileFormat.TextMode.
π§© Capability support
| Capability | Support | Notes |
|---|---|---|
| WinForms UI | β | Native Windows Forms dialog/window implementation. |
| Live preview | β | Async/debounced rendering with cancellation. |
| Quantizer discovery | β | Uses the FrameworkExtensions quantizer registry. |
| Ditherer discovery | β | Uses the FrameworkExtensions ditherer registry. |
| Palette-size selection | β | 2β256 colors. |
| Fixed palette size | β | ForcePaletteSize(int) constrains formats such as monochrome targets. |
| Cross-platform UI | β | This is intentionally a WinForms/Windows package. |
Quantizer and ditherer names are not duplicated into a static documentation list because their registries are the authoritative source and can grow independently.
π Quick start
using Hawkynt.ImageTransformUI;
using var dialog = new ReduceColorsWindow(sourceBitmap);
// Optional for formats with a fixed palette size.
// dialog.ForcePaletteSize(2);
if (dialog.ShowDialog() == DialogResult.OK) {
var quantizer = dialog.PickedQuantizerName;
var ditherer = dialog.PickedDithererName;
var paletteSize = dialog.PaletteSize;
// Apply the selected transformation in the caller's image pipeline.
}
π API
| Member | Purpose |
|---|---|
ReduceColorsWindow(Bitmap) |
Create the color-reduction dialog for a source bitmap. |
ForcePaletteSize(int) |
Lock the palette-size choice to a format-required value. |
PickedQuantizerName |
Registry name selected by the user. |
PickedDithererName |
Registry name selected by the user. |
PaletteSize |
Selected palette cardinality. |
ποΈ Architecture
The package deliberately owns UI, not color science. Quantizers, ditherers, and their registry metadata come from FrameworkExtensions.System.Drawing; this package renders those choices, previews the result, and returns the selected configuration to the caller.
That keeps format projects and optimizers from each growing their own slightly different βreduce colorsβ dialog.
π API reference
Every public and protected member of all 4 types, generated from the built assembly and its XML documentation, is in REFERENCE.md.
π Dependencies
| Dependency | Role | Reference |
|---|---|---|
FrameworkExtensions.System.Drawing |
Quantizer/ditherer registries and image-processing implementations. | NuGet |
System.Drawing.Common |
Bitmap/GDI+ operations. | Microsoft documentation |
| WinForms | Native Windows UI framework. | Microsoft WinForms |
FileFormat.TextMode |
Font/codepage preview infrastructure used by text-mode pickers. | Repository project |
β οΈ Limitations
- Windows-only by design because it is a WinForms package.
- Quantizer/ditherer availability follows the referenced FrameworkExtensions version; names should be treated as registry identifiers, not a frozen list owned by this package.
- The dialog returns the selected transformation parameters; the surrounding application remains responsible for file-format constraints and persistence.
β€οΈ Support
If this project saves you time or money, consider supporting its development:
π License
Licensed under LGPL-3.0-or-later β see the repository LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- FileFormat.TextMode (>= 1.0.0.1282)
- FrameworkExtensions.Backports (>= 1.0.0.256)
- FrameworkExtensions.System.Drawing (>= 1.0.0.132)
- System.Drawing.Common (>= 9.0.4)
-
net10.0-windows7.0
- FileFormat.TextMode (>= 1.0.0.1282)
- FrameworkExtensions.Backports (>= 1.0.0.256)
- FrameworkExtensions.System.Drawing (>= 1.0.0.132)
-
net8.0-windows7.0
- FileFormat.TextMode (>= 1.0.0.1282)
- FrameworkExtensions.Backports (>= 1.0.0.256)
- FrameworkExtensions.System.Drawing (>= 1.0.0.132)
- System.Drawing.Common (>= 9.0.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.