ChromaFx.Core
0.5.0-beta.45
See the version list below for details.
dotnet add package ChromaFx.Core --version 0.5.0-beta.45
NuGet\Install-Package ChromaFx.Core -Version 0.5.0-beta.45
<PackageReference Include="ChromaFx.Core" Version="0.5.0-beta.45" />
<PackageVersion Include="ChromaFx.Core" Version="0.5.0-beta.45" />
<PackageReference Include="ChromaFx.Core" />
paket add ChromaFx.Core --version 0.5.0-beta.45
#r "nuget: ChromaFx.Core, 0.5.0-beta.45"
#:package ChromaFx.Core@0.5.0-beta.45
#addin nuget:?package=ChromaFx.Core&version=0.5.0-beta.45&prerelease
#tool nuget:?package=ChromaFx.Core&version=0.5.0-beta.45&prerelease
Modern .NET image processing library.
A lean, managed alternative for .NET apps that need image processing without native codec DLLs.
Key points:
- Pure managed C# on .NET 10 — no third-party NuGet dependencies, no native codec binaries to deploy (BMP, PNG, JPEG, GIF)
- Uses
Span<T>,ArrayPool, and SIMD on key paths - Explicit
Mutate/Cloneprocessing API - Typed encoders (
JpegEncoder,PngEncoder, …) and a publicImageFormatsregistry for extensions - Pipeline-friendly fluent context for common filters
Performance & Architecture
Fully managed on .NET 10 — no native codec binaries for Docker/Lambda multi-arch. Native code can still edge out pure managed pixel loops; ChromaFx prioritizes deployability and allocation-conscious processing for typical decode → filter → encode pipelines. Measure with tests/ChromaFx.Benchmarks for your scenario.
Packages
| Package | Description | NuGet Link |
|---|---|---|
ChromaFx |
Meta-package for .NET 10 (Core + IO + Processing). |
ChromaFx |
ChromaFx.Core |
Core types and abstractions. | ChromaFx.Core |
ChromaFx.IO |
Image file IO, encoding/decoding support. | ChromaFx.IO |
ChromaFx.Processing |
Image processing algorithms and effects. | ChromaFx.Processing |
- Use
ChromaFxfor new projects targeting .NET 10. - Use
ChromaFx.Core,ChromaFx.IO, andChromaFx.Processingfor modular usage.
Installation
dotnet add package ChromaFx
Getting Started
// With PackageReference to ChromaFx, common namespaces are injected.
var thumb = Image.Load("input.png")
.Clone(ctx => ctx
.Resize(200, 200)
.Rotate(90)
.Invert());
thumb.Save("output.jpg", new JpegEncoder { Quality = 85 });
Image.Load("input.png")
.Mutate(ctx => ctx.Resize(800, 600).Brightness(0.1f))
.Save("output.png");
API notes
- Prefer the
ChromaFxmeta-package (ChromaFx.Core+.IO+.Processing). Image.Load/Save/ImageFormatslive in IO; Mutate/Clone in Processing.- Fluent context: core ops on
IImageProcessingContext, more via extensions (BoxBlur,Saturation,Dilate,Grayscale, …); escape hatchApply(IFilter). - Typed encoders:
ChromaFx.IO.Encoders(JpegEncoder,PngEncoder,GifEncoderasIAnimationEncoder, …). - Plugins:
IImageFormat/IAnimationFormat(Encodethrows on failure);FileFormats.WebP/Avifreserved for a future native package or custom plugins. Animationsupports per-frame delays (GetFrameDelay/SetFrameDelay/FrameDelays);Delaysets all frames.- Path
Save/SaveAsyncuse the last registered format that accepts the extension (plugins can override built-ins).ImageFormats.TryGetFormatlooks up by id and returns the first match. - Meta-package injects common usings via
buildTransitive/ChromaFx.props. - Pack with
dotnet pack(not on every local build).
Migration (breaking)
These older APIs are removed (not obsolete):
| Removed | Use instead |
|---|---|
img.Apply(...) / img.Apply<T>() |
img.Mutate(c => c.Invert()) / c.Apply(filter) |
img.Process(...) / ImagePipeline |
img.Mutate / Clone |
ImageOperatorExtensions (BrightnessUp, …) |
Clone/Mutate + context ops |
img.Copy() |
img.Clone() |
img.Save(path) → bool |
void (throws) |
IImageFormat.Encode → bool |
void (throws) |
LoadAnimation(path) |
Animation.Load(path) |
FormatManager / Manager |
ImageFormats.Register |
IFormat |
IImageFormat |
| Public format types as the only API | Prefer ImageFormats / typed encoders (BmpFormat etc. remain public for advanced use) |
Requirements
- .NET 10 SDK
Changelog
See CHANGELOG.md for notable changes. A separate docs site is planned; until then this README is the primary guide.
License
Apache 2.0 - see LICENSE
Attribution
This project is a fork of Structure.Sketching, originally developed by JaCraig under the Apache License 2.0.
Modifications and ongoing maintenance by Ho Tzin Mein (2023–2026).
Roadmap
- ✅ Modularization – Core, IO, Processing packages split out.
- ✅ API modernization –
Mutate/Clone, typed encoders,ImageFormatsregistry. - ⏭ Performance – broaden
Span/ArrayPool/SIMD coverage beyond current hot paths. - ⏭ Extended formats – optional native extension package (WebP/AVIF/…).
- ⏭ Extended features – pixel upscaling, more drawing/effects.
Contributing
Contributions, bug reports, and suggestions are welcome.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on ChromaFx.Core:
| Package | Downloads |
|---|---|
|
ChromaFx
Modern, high-performance .NET image processing and drawing library. Supports PNG, JPEG, BMP, and GIF, with pipeline-friendly APIs. Targets .NET 10. |
|
|
ChromaFx.IO
Image file input/output support for ChromaFx. Load, save, and convert images in PNG, JPEG, BMP, GIF, TGA, TIFF, and ICO formats. |
|
|
ChromaFx.Processing
Image processing algorithms and effects for ChromaFx. Includes transformations, filters, and pixel-level operations for high-performance image workflows. |
|
|
ChromaFx.PixelArt
Pixel-art upscaling and rotation for ChromaFx. Scale2x/3x/4x/8x (EPX), Hq2x–4x, CleanEdge, Eagle/SaI, RotSprite RotateSprite, and CleanEdgeRotate. |
|
|
ChromaFx.Retro
Retro hardware palettes, 90s web/Win9x UI looks, and early-2000s filter effects for ChromaFx. Opt-in pack (not in the meta-package). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.6.7 | 76 | 11/28/2026 |
| 0.6.6 | 172 | 11/20/2026 |
| 0.6.5 | 177 | 11/18/2026 |
| 0.6.4 | 182 | 11/16/2026 |
| 0.6.3 | 174 | 11/14/2026 |
| 0.6.2 | 165 | 11/6/2026 |
| 0.6.1 | 158 | 11/4/2026 |
| 0.6.0 | 152 | 11/3/2026 |
| 0.5.0-beta.53 | 94 | 11/3/2026 |
| 0.5.0-beta.52 | 92 | 11/3/2026 |
| 0.5.0-beta.51 | 87 | 11/3/2026 |
| 0.5.0-beta.50 | 91 | 11/3/2026 |
| 0.5.0-beta.49 | 83 | 11/3/2026 |
| 0.5.0-beta.48 | 89 | 11/3/2026 |
| 0.5.0-beta.47 | 82 | 11/3/2026 |
| 0.5.0-beta.46 | 87 | 11/3/2026 |
| 0.5.0-beta.45 | 106 | 10/31/2026 |
| 0.4.0-beta.44 | 99 | 10/24/2026 |
| 0.4.0-beta.42 | 98 | 10/20/2026 |
| 0.4.0-beta.41 | 92 | 10/20/2026 |
0.5.0 beta line. See CHANGELOG.md. API may still change before 1.0.