Recursive AI

ImageSharp vs SkiaSharp for .NET

Same PNG-to-JPEG resize in each library

Choose ImageSharp for managed .NET image processing if its license fits. Choose SkiaSharp for 2D drawing if you can ship native Skia binaries.

Under Six Labors’ Split License v1.0 (checked December 3, 2026), ImageSharp is free for open-source or source-available software, indirect dependencies brought in by an unrelated third party, nonprofits, charities, and for-profit users below $1 million in annual gross revenue; other uses fall under Six Labors’ commercial license.

OneImage is a free, open-source alternative from Recursive AI for managed image processing (MIT or Apache-2.0). NuGet · GitHub.

dotnet add package RecursiveAI.OneImage --version 1.11.3

Program.cs.NET 10
using OneImage;
 
Image.Load("input.png")
    .Resize(width: 800)
    .Save("oneimage.jpg", new SaveOptions
    {
        EncoderOptions = new JpegEncoderOptions { Quality = 85 }
    });

Same input, same output size

All three resize the same test PNG to 800 pixels wide, preserve its aspect ratio, and save a JPEG at quality 85.

For each sample, use a separate .NET 10 console project. Save the 1,600 × 1,200 test PNG as input.png in each project. Install the package shown, replace Program.cs, and run dotnet run -c Release from the project directory.

ImageSharp: resize in place, then pass an encoder

dotnet add package SixLabors.ImageSharp --version 3.1.12

This sample uses the released 3.1.12 package under its Split License v1.0 provision for open-source software; the sample itself is Apache-2.0. This pin is for reproducing the demo, not for shipping: check Six Labors’ security advisories before picking a production release. The ImageSharp resize docs explain why a height of zero preserves aspect ratio and how to select a different resampler.

Program.cs.NET 10
// SPDX-License-Identifier: Apache-2.0
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Processing;
 
using var image = Image.Load("input.png");
image.Mutate(ctx => ctx.Resize(800, 0));
image.Save("imagesharp.jpg", new JpegEncoder { Quality = 85 });

SkiaSharp: set the destination size and sampling

dotnet add package SkiaSharp --version 4.153.1

On Linux, also install the native package used in this run: dotnet add package SkiaSharp.NativeAssets.Linux.NoDependencies --version 4.153.1. The bitmap resize API takes both destination dimensions and a sampling option. Encode returns data that you write to a stream.

Program.cs.NET 10
using SkiaSharp;
 
using var bitmap = SKBitmap.Decode("input.png")
    ?? throw new InvalidDataException("Could not decode input.png.");
var height = (int)Math.Round(bitmap.Height * (800d / bitmap.Width));
var size = new SKSizeI(800, height);
var sampling = new SKSamplingOptions(SKFilterMode.Linear);
using var resized = bitmap.Resize(size, sampling)
    ?? throw new InvalidOperationException("Could not resize the image.");
using var jpeg = resized.Encode(SKEncodedImageFormat.Jpeg, 85)
    ?? throw new InvalidOperationException("Could not encode JPEG.");
using var output = File.Create("skiasharp.jpg");
jpeg.SaveTo(output);

Files produced on Ubuntu 26.04 x64 and independently decoded:

FileDecoded outputBytes
oneimage.jpg800 × 600 JPEG16,753
imagesharp.jpg800 × 600 JPEG20,188
skiasharp.jpg800 × 600 JPEG16,720

The byte counts describe this one file. The libraries use different sampling or encoder settings, and a quality setting of 85 does not guarantee the same visual quality. This run does not measure speed, memory use, or quality.

Deployment: managed .NET or native Skia

ImageSharp runs in managed .NET code, so there is no separate ImageSharp native binary to match to your container. SkiaSharp distributes Linux binaries separately. The NoDependencies package is still native. Match the managed and native package versions, then run the decode-and-encode path in your final image on the architecture you deploy. A successful build alone does not prove that the native library will load there. See the SkiaSharp Linux and Docker guide for troubleshooting.

Capabilities: image processing or drawing

ImageSharp is a natural fit for a worker that opens photos, fits them into layout boxes, and saves new files. Its core resize options cover crop, pad, and fit without cropping. For drawing paths or text on top of those images, Six Labors documents a separate ImageSharp.Drawing package.

SkiaSharp makes sense when the bitmap is one part of a rendered scene. For example, use the same canvas API to draw the resized image, a path, and text for a badge. The resize example does not need a GPU: it uses the bitmap API and creates no GPU context.

OneImage fits when you want the managed deployment of an image-processing library without a commercial tier. Its resize pipeline is lazy: Resize describes the operation and Save produces the pixels. For phone-photo uploads, look at Image.Thumbnail in the guide before adapting this sample: it applies EXIF orientation before resizing and strips EXIF, XMP, and IPTC by default.

Licensing: check the version you plan to ship

Checked December 3, 2026. The ImageSharp 3.1.12 license describes when Apache-2.0 applies and when it points to commercial terms. For current releases, read Six Labors’ published license and pricing and key guidance before choosing a version for a new app. Do not assume the sample’s license or build setup carries forward to another release. SkiaSharp 4.153.1 publishes an MIT license for the wrapper.