ImageProcessor.Core.CoreCompat
2.0.2
dotnet add package ImageProcessor.Core.CoreCompat --version 2.0.2
NuGet\Install-Package ImageProcessor.Core.CoreCompat -Version 2.0.2
<PackageReference Include="ImageProcessor.Core.CoreCompat" Version="2.0.2" />
<PackageVersion Include="ImageProcessor.Core.CoreCompat" Version="2.0.2" />
<PackageReference Include="ImageProcessor.Core.CoreCompat" />
paket add ImageProcessor.Core.CoreCompat --version 2.0.2
#r "nuget: ImageProcessor.Core.CoreCompat, 2.0.2"
#:package ImageProcessor.Core.CoreCompat@2.0.2
#addin nuget:?package=ImageProcessor.Core.CoreCompat&version=2.0.2
#tool nuget:?package=ImageProcessor.Core.CoreCompat&version=2.0.2
ImageProcessor.Core
╔══════════════════════════════════════════════════════════════╗
║ ║
║ ██╗███╗ ███╗ █████╗ ██████╗ ███████╗ ║
║ ██║████╗ ████║██╔══██╗██╔════╝ ██╔════╝ ║
║ ██║██╔████╔██║███████║██║ ███╗█████╗ ║
║ ██║██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ║
║ ██║██║ ╚═╝ ██║██║ ██║╚██████╔╝███████╗ ║
║ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ║
║ ║
║ P R O C E S S O R · C O R E ║
║ ║
║ Fluent image processing — built on .NET, runs anywhere ║
╚══════════════════════════════════════════════════════════════╝
Why do you need this?
You have an image. You want this:
┌──────────────┐ ┌──────────────┐
│ raw photo │ ─────────────► │ processed │
│ ugly size │ one fluent chain │ watermarked │
│ no watermark│ │ resized │
│ wrong format│ │ PNG / WEBP │
└──────────────┘ └──────────────┘
Standard .NET gives you this:
var bmp = new Bitmap(file);
var g = Graphics.FromImage(bmp);
g.DrawImage(...); // resize — 20 lines
g.DrawString(...); // watermark — 15 lines
bmp.Save(file, codec); // format — 10 more lines
ImageProcessor.Core gives you this:
new ImageFactory()
.Load(file)
.Resize(new ResizeLayer(800, 600))
.Watermark(new TextLayer { Text = "© Me" })
.Format(new PngFormat())
.Save(output); // done. 6 lines.
One library. Fluent API. No ceremony. Stop wiring
Graphics,ImageCodecInfo, andEncoderParametersby hand. Every operation is a single chained call — readable, testable, and composable.
What it can do
┌─────────────────────────────────────────────────────────┐
│ ImageFactory │
│ │
│ Load ──┬── Resize ──── Crop ──── Rotate ── Save │
│ │ │
│ ├── Filters ─┬─ GaussianBlur │
│ │ ├─ GaussianSharpen │
│ │ ├─ DetectEdges │
│ │ ├─ Gray / Binary / Halftone │
│ │ └─ Tint / Vignette / Hue │
│ │ │
│ ├── Adjust ──┬─ Brightness / Contrast │
│ │ ├─ Saturation / Gamma │
│ │ ├─ Alpha / ReplaceColor │
│ │ └─ Resolution / Quality │
│ │ │
│ ├── Compose ─┬─ Watermark (text) │
│ │ ├─ Overlay (image on image) │
│ │ ├─ Mask │
│ │ └─ Background / BackgroundColor │
│ │ │
│ ├── Special ─┬─ Mosaic (pixelated region) │
│ │ ├─ Pixelate │
│ │ ├─ RoundedCorners │
│ │ ├─ EntropyCrop (smart crop) │
│ │ ├─ ClearNoise / ClearBackground │
│ │ └─ Flip / AutoRotate / Scale │
│ │ │
│ └── Format ──┬─ JPEG / PNG / GIF / BMP │
│ └─ (preserves animation in GIF) │
└─────────────────────────────────────────────────────────┘
Install
dotnet add package ImageProcessor.Core.CoreCompat
Or via Package Manager:
Install-Package ImageProcessor.Core.CoreCompat
Quick start
using ImageProcessor;
using ImageProcessor.Imaging;
using ImageProcessor.Imaging.Formats;
// Resize + sharpen + save as PNG
using var factory = new ImageFactory();
factory.Load("input.jpg")
.Resize(new ResizeLayer(1280, 720))
.GaussianSharpen(5)
.Format(new PngFormat())
.Save("output.png");
// Mosaic (pixelate) a region — great for censoring faces / text
factory.Load("screenshot.png")
.Mosaic(new MosaicLayer(x: 100, y: 50, width: 200, height: 80,
size: new Size(10, 10)))
.Save("censored.png");
// Add a watermark
factory.Load("photo.jpg")
.Watermark(new TextLayer
{
Text = "© My Company",
FontSize = 24,
Position = new Point(20, 20),
Opacity = 80
})
.Save("photo_watermarked.jpg");
// Chain multiple operations
factory.Load("raw.gif")
.AutoRotate()
.Resize(new ResizeLayer(800, 600, ResizeMode.Crop))
.Brightness(10)
.Contrast(5)
.Quality(85)
.Save("final.gif"); // GIF animation preserved
Mosaic / censoring in detail
Original image After Mosaic(x:450, y:280, w:140, h:50)
┌─────────────────┐ ┌─────────────────┐
│ │ │ │
│ [face here] │ │ [██████████] │ ← pixelated block
│ │ │ │
└─────────────────┘ └─────────────────┘
factory.Load("photo.gif")
.Mosaic(new MosaicLayer(450, 280, 140, 50, new Size(10, 10)))
.Save("photo_censored.gif");
Pipeline architecture
┌──────────┐
file/stream│ │
──────────► │ .Load() │
└────┬─────┘
│ Image + Format detected
▼
┌────────────────┐
│ Processor chain│ ◄── each .Method() enqueues a processor
│ [ P1, P2, P3 ]│
└────────┬───────┘
│ applied in order
▼
┌──────────┐
│ .Save() │──────► file / stream
└──────────┘
Each processor implements IGraphicsProcessor — you can also add your own:
public class MyProcessor : IGraphicsProcessor
{
public Image ProcessImage(ImageFactory factory)
{
// manipulate factory.Image
return factory.Image;
}
}
factory.Load("img.png")
.ApplyProcessor(new MyProcessor())
.Save("out.png");
Target frameworks
| Framework | Support | Notes |
|---|---|---|
| .NET Standard 2.0 | ✅ | .NET Framework 4.6.1+, .NET Core 2.0+ |
| .NET 8 (Windows) | ✅ | Uses native GDI+ via System.Drawing.Common |
| .NET 9 (Windows) | ✅ | Uses native GDI+ via System.Drawing.Common |
System.Drawing.Commonis Windows-only on .NET 6+. This library targetsnet8.0-windowsandnet9.0-windowsfor modern .NET to make that constraint explicit and safe.
Contributing
PRs and issues welcome. Please open an issue before submitting large changes.
License
Apache License 2.0 — originally by James Jackson-South, extended here with additional processors (Mosaic, ClearNoise, Binary, etc.).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. net8.0-windows7.0 is compatible. 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. net9.0-windows7.0 is compatible. net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- System.Drawing.Common (>= 9.0.0)
-
net8.0-windows7.0
- Microsoft.CSharp (>= 4.7.0)
- System.Drawing.Common (>= 9.0.0)
-
net9.0-windows7.0
- Microsoft.CSharp (>= 4.7.0)
- System.Drawing.Common (>= 9.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ImageProcessor.Core.CoreCompat:
| Package | Downloads |
|---|---|
|
Picupmedia.Video.DirectShow
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.