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
                    
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="ImageProcessor.Core.CoreCompat" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ImageProcessor.Core.CoreCompat" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="ImageProcessor.Core.CoreCompat" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ImageProcessor.Core.CoreCompat --version 2.0.2
                    
#r "nuget: ImageProcessor.Core.CoreCompat, 2.0.2"
                    
#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.
#:package ImageProcessor.Core.CoreCompat@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ImageProcessor.Core.CoreCompat&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=ImageProcessor.Core.CoreCompat&version=2.0.2
                    
Install as a Cake Tool

ImageProcessor.Core

 ╔══════════════════════════════════════════════════════════════╗
 ║                                                              ║
 ║   ██╗███╗   ███╗ █████╗  ██████╗ ███████╗                   ║
 ║   ██║████╗ ████║██╔══██╗██╔════╝ ██╔════╝                   ║
 ║   ██║██╔████╔██║███████║██║  ███╗█████╗                     ║
 ║   ██║██║╚██╔╝██║██╔══██║██║   ██║██╔══╝                     ║
 ║   ██║██║ ╚═╝ ██║██║  ██║╚██████╔╝███████╗                   ║
 ║   ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚══════╝                   ║
 ║                                                              ║
 ║        P R O C E S S O R  ·  C O R E                        ║
 ║                                                              ║
 ║   Fluent image processing — built on .NET, runs anywhere    ║
 ╚══════════════════════════════════════════════════════════════╝

NuGet Build License: Apache 2.0 .NET Docs


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, and EncoderParameters by 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.Common is Windows-only on .NET 6+. This library targets net8.0-windows and net9.0-windows for 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
2.0.2 82 2/28/2026
2.0.1 58 2/28/2026
1.3.0 71,585 2/21/2020