Swevo.AutoImage 1.1.0

Prefix Reserved
dotnet add package Swevo.AutoImage --version 1.1.0
                    
NuGet\Install-Package Swevo.AutoImage -Version 1.1.0
                    
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="Swevo.AutoImage" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Swevo.AutoImage" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Swevo.AutoImage" />
                    
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 Swevo.AutoImage --version 1.1.0
                    
#r "nuget: Swevo.AutoImage, 1.1.0"
                    
#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 Swevo.AutoImage@1.1.0
                    
#: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=Swevo.AutoImage&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Swevo.AutoImage&version=1.1.0
                    
Install as a Cake Tool

AutoImage

NuGet NuGet Downloads CI License: MIT

Free, MIT-licensed fluent image processing for .NET. No revenue threshold, no commercial license — ever.

Why AutoImage?

ImageSharp is licensed under the Six Labors Split License: free for individuals, open source projects, and companies under $1M annual revenue — everyone else needs a paid commercial license, with no exemption for public-sector or non-profit organizations above that threshold. AutoImage wraps SkiaSharp (MIT licensed, Google's Skia graphics engine) behind a small, fluent, ImageSharp-like API for the operations most apps actually need, fully free for everyone regardless of revenue.

What AutoImage actually is

AutoImage is a thin fluent wrapper. It contains no image codec, resampling, or compositing logic of its own — every decode, resize, crop, and encode is performed by SkiaSharp. AutoImage only provides a small, chainable surface over it:

  • Load a file path or stream
  • Resize with Stretch, Fit (letterbox, preserves aspect ratio), or Cover (crop-to-fill, like CSS background-size: cover)
  • Crop to an explicit rectangle
  • Rotate90 in 90-degree increments
  • Basic filters: Grayscale, Blur, Sharpen, Brightness, Contrast, Saturate
  • Text and image watermarks
  • Save to a file or ToBytes in memory, encoding to Png, Jpeg, Webp, Bmp, or Gif

What AutoImage explicitly does NOT do

Arbitrary-angle rotation and advanced multi-layer compositing are not implemented. These are exactly the areas where a thin wrapper stops adding value over using SkiaSharp directly — if you need them, use SkiaSharp (or SKCanvas/SKPaint) directly; AutoImage's AutoImageEditor does not hide access to anything, but also doesn't attempt to wrap every SkiaSharp API.

Install

dotnet add package Swevo.AutoImage

Linux/macOS: SkiaSharp's managed package alone only ships Windows native binaries. On Linux or macOS, also add the matching native asset package for your platform (e.g. dotnet add package SkiaSharp.NativeAssets.Linux, or SkiaSharp.NativeAssets.macOS), or use a base image that already provides libSkiaSharp.

Quick start

using AutoImage;

using var editor = AutoImageEditor.Load("input.jpg");

editor
    .Resize(800, 600, AutoImageResizeMode.Cover)
    .Brightness(0.1f)
    .Saturate(1.2f)
    .Watermark("© Swevo", AutoImageWatermarkPosition.BottomRight, opacity: 0.6f, fontSize: 28f)
    .Save("output.png", AutoImageFormat.Png);

Working in memory (e.g. inside an API endpoint):

using var editor = AutoImageEditor.Load(uploadedFileStream);
editor.Resize(320, 320, AutoImageResizeMode.Fit);

byte[] thumbnail = editor.ToBytes(AutoImageFormat.Webp, quality: 80);

Rotating and cropping:

using var editor = AutoImageEditor.Load("photo.jpg");

editor
    .Rotate90()                 // 90 degrees clockwise
    .Crop(x: 0, y: 0, width: 500, height: 500);

Applying filters:

using var editor = AutoImageEditor.Load("portrait.jpg");

editor
    .Blur(1.5f, 1.5f)
    .Sharpen()
    .Contrast(0.15f)
    .Save("portrait-enhanced.jpg", AutoImageFormat.Jpeg, quality: 90);

Adding watermarks:

using AutoImage;
using SkiaSharp;

using var editor = AutoImageEditor.Load("photo.jpg");
using var logo = SKBitmap.Decode("logo.png");

editor
    .Watermark("Draft", AutoImageWatermarkPosition.TopLeft, opacity: 0.35f, fontSize: 48f, color: SKColors.White)
    .Watermark(logo, AutoImageWatermarkPosition.BottomRight, opacity: 0.85f, scale: 0.5f)
    .Save("watermarked.png", AutoImageFormat.Png);

Or load the watermark image from a file path:

using var editor = AutoImageEditor.Load("photo.jpg");

editor
    .WatermarkImage("logo.png", AutoImageWatermarkPosition.BottomRight, opacity: 0.85f, scale: 0.5f)
    .Save("watermarked.png", AutoImageFormat.Png);

Resize modes

Mode Behavior
Stretch Scales width/height independently to exactly match the target size (may distort aspect ratio).
Fit Scales to fit entirely within the target size, preserving aspect ratio (result may be smaller than the target on one axis).
Cover Crops to the target aspect ratio first, then scales to exactly fill the target size.

License

MIT

Product 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 101 7/10/2026
1.0.0 99 7/9/2026

1.1.0: Added Blur/Sharpen/Brightness/Contrast/Saturate filters plus text/image watermark support on AutoImageEditor, and updated README examples. 1.0.0: Initial release. Fluent AutoImageEditor with Load/Resize (Stretch/Fit/Cover)/Crop/Rotate90/Grayscale/Save/ToBytes over Png/Jpeg/Webp/Bmp/Gif, backed entirely by SkiaSharp.