SixLabors.ImageSharp.Drawing 3.0.0

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

SixLabors.ImageSharp.Drawing

SixLabors.ImageSharp.Drawing

Build Status Code coverage License: Six Labors Split

ImageSharp.Drawing is a cross-platform 2D drawing library built on top of ImageSharp. It adds a rich vector drawing model for composing raster images, rendering text, shaping paths, masking image-processing operations, and targeting CPU or WebGPU-backed drawing surfaces from the same DrawingCanvas API.

The core package targets .NET 8 and provides the default CPU backend. The optional SixLabors.ImageSharp.Drawing.WebGPU package adds GPU-backed rendering for native windows, external surfaces, and offscreen render targets.

Capabilities

  • Draw and fill paths, lines, arcs, ellipses, pies, rectangles, rounded rectangles, regular polygons, stars, and arbitrary PathBuilder geometry.
  • Use solid, pattern, image, recolor, linear gradient, radial gradient, elliptic gradient, sweep gradient, and path gradient brushes.
  • Stroke paths and polylines with configurable width, caps, joins, dash patterns, and stroke options.
  • Render text with SixLabors.Fonts, including rich text runs, fallback fonts, bidirectional text, vertical layout, glyph paths, text measurement, wrapped text, and text-on-path scenarios.
  • Compose with transforms, clipping, save/restore state, isolated layers, blend options, opacity, and region canvases.
  • Use paths as masks for ImageSharp processors with canvas.Apply(...), or fill paths with images via ImageBrush.
  • Create retained drawing scenes and render them repeatedly to compatible targets.
  • Render into Image<TPixel> memory with the CPU backend, or into WebGPU windows, external host surfaces, and offscreen render targets with the WebGPU backend.

Quick Start

Draw into an Image<TPixel> with the CPU backend:

image.Mutate(ctx => ctx.Paint(canvas =>
{
    // A fill without geometry paints the entire canvas.
    canvas.Fill(Brushes.Solid(Color.White));

    // Brushes can be reused across paths or used directly for full-canvas fills.
    canvas.Fill(new LinearGradientBrush(
        new PointF(0, 0),
        new PointF(400, 300),
        GradientRepetitionMode.None,
        new ColorStop(0F, Color.CornflowerBlue),
        new ColorStop(1F, Color.MediumSeaGreen)));

    // Built-in polygon types are regular IPath instances accepted by Fill and Draw.
    canvas.Fill(Brushes.Solid(Color.HotPink), new EllipsePolygon(200, 200, 100));
    canvas.Draw(Pens.Solid(Color.Navy, 3F), new RoundedRectanglePolygon(50, 50, 200, 100, 16));
}));

Draw into a native WebGPU window with the same canvas-facing API:

using WebGPUWindow window = new(new WebGPUWindowOptions
{
    Title = "ImageSharp.Drawing",
    Size = new Size(800, 600),
    Format = WebGPUTextureFormat.Bgra8Unorm,
    PresentMode = WebGPUPresentMode.Fifo,
});

window.Run(frame =>
{
    DrawingCanvas canvas = frame.Canvas;

    // WebGPU frames expose the same DrawingCanvas API as CPU image processing.
    canvas.Fill(Brushes.Solid(Color.Black));
    canvas.Fill(Brushes.Solid(Color.CornflowerBlue), new EllipsePolygon(400, 300, 120));
});

License

Support Six Labors

Support the efforts of the development of the Six Labors projects.

Documentation

  • Detailed documentation for the ImageSharp.Drawing API is available. This includes additional conceptual documentation to help you get started.
  • Our Samples Repository is also available containing buildable code samples demonstrating common activities.

Questions?

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

Installation

Install stable releases via NuGet; development releases are available via MyGet.

Package Name Release (NuGet) Nightly (MyGet)
SixLabors.ImageSharp.Drawing NuGet feedz.io
SixLabors.ImageSharp.Drawing.WebGPU NuGet feedz.io

Manual build

If you prefer, you can compile ImageSharp.Drawing yourself (please do and help!)

Alternatively, you can work from command line and/or with a lightweight editor on both Linux/Unix and Windows:

To clone ImageSharp.Drawing locally, click the "Clone in [YOUR_OS]" button above or run the following git commands:

git clone https://github.com/SixLabors/ImageSharp.Drawing

If working with Windows please ensure that you have enabled log file paths in git (run as Administrator).

git config --system core.longpaths true

Submodules

This repository contains git submodules. To add the submodules to the project, navigate to the repository root and type:

git submodule update --init --recursive

How can you help?

Please... Spread the word, contribute algorithms, submit performance improvements, unit tests, no input is too little. Make sure to read our Contribution Guide before opening a PR.

The ImageSharp.Drawing Team

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 (428)

Showing the top 5 NuGet packages that depend on SixLabors.ImageSharp.Drawing:

Package Downloads
IronSoftware.System.Drawing

IronSoftware.System.Drawing - The C# Image Library A universally compatible Bitmap format for .NET 8, .NET 7, .NET 6, and .NET 5, .NET Core on Windows, macOS, Linux, Docker, AWS, Azure, NanoServer, IIS, Mobile, Xamarin, iOS, Android, and Google Compute. Works seamlessly with popular Image and Bitmap formats such as System.Drawing.Bitmap, SkiaSharp, SixLabors.ImageSharp, Microsoft.Maui.Graphics. Implicit casting means that using this class to input and output Bitmap and image types from public API's gives full compatibility to all image type fully supported by Microsoft. Key library features include: * AnyBitmap: A universally compatible Bitmap class. Implicit casting between System.Drawing.Bitmap, System.Drawing.Image, SkiaSharp.SKBitmap, SkiaSharp.SKImage, SixLabors.ImageSharp, Microsoft.Maui.Graphics.Platform.PlatformImage to IronSoftware.Drawing.AnyBitmap * Color: A universally compatible Color class. Implicit casting between System.Drawing.Color, SkiaSharp.SKColor, SixLabors.ImageSharp.Color, SixLabors.ImageSharp.PixelFormats to IronSoftware.Drawing.Color * Rectangle: A universally compatible Rectangle class. Implicit casting between System.Drawing.Rectangle, SkiaSharp.SKRect, SkiaSharp.SKRectI, SixLabors.ImageSharp.Rectangle to IronSoftware.Drawing.Rectangle * Font: A universally compatible Font class. Implicit casting between System.Drawing.Font, SkiaSharp.SKFont, SixLabors.Fonts.Font to IronSoftware.Drawing.Font * Point: A universally compatible Point class. Implicit casting between System.Drawing.Point, SixLabors.ImageSharp.Point, SkiaSharp.SKPointI to IronSoftware.Drawing.Point * Size: A universally compatible Size class. Implicit casting between System.Drawing.Size, SixLabors.ImageSharp.Size, SkiaSharp.SKSizeI to IronSoftware.Drawing.Size IronSoftware.Drawing can be used within C#, VB.NET, F#, ASP.NET projects, MVC, Web Services, Console & Desktop Applications. Supports: * .NET 9 * .NET 8 * .NET 7 * .NET 6 * .NET 5 * .NET Core 2.0 + * .NET Framework 4.6.2 + For general support and technical inquiries, please email us at: support@ironsoftware.com

MiNET

MiNET - a Minecraft PocketEdition Server

Stimulsoft.Reports.Engine.NetCore

DEPRECATED: This package will be discontinued in future versions. Please switch to the https://www.nuget.org/packages/Stimulsoft.Reports.Engine package, which includes the full functionality of this package along with additional features, libraries, and framework support. The native .NET Core cross platform report engine is a part of the reporting tool for .NET Core and .NET frameworks, that renders reports from getting data from the source, building bands, calculating aggregate functions, charting, applying styles, conditions, filtering, sorting, and more. Also, the report engine has algorithms for exporting reports to various formats such as PDF, Rich Text, Excel, and others.

Stimulsoft.Reports.Engine

The report engine is a part of the reporting tool for the .NET Framework and .NET platforms that renders reports, processes data, calculates aggregate functions, generates charts, applies styles and conditions, and supports filtering, sorting, and exporting. The report engine also includes algorithms for exporting reports to various formats such as PDF, RTF, Word, Excel, and others.

cloudscribe.FileManager.Web

media file management

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 25,491 5/12/2026
2.1.7 4,416,701 7/31/2025
2.1.6 1,537,797 4/26/2025
2.1.5 1,621,662 1/8/2025
2.1.4 5,701,330 7/22/2024
2.1.3 1,814,042 4/15/2024
2.1.2 1,354,434 3/6/2024
2.1.1 754,204 1/23/2024
2.1.0 284,836 12/6/2023
2.0.1 390,072 10/31/2023
2.0.0 2,120,746 9/15/2023
1.0.0 7,742,845 8/14/2023
1.0.0-beta15 4,886,628 7/22/2022
1.0.0-beta14 5,539,292 2/9/2022
1.0.0-beta13 1,509,118 5/27/2021
1.0.0-beta11 1,175,238 11/20/2020
1.0.0-beta0010 1,072,435 6/30/2020
1.0.0-beta0009 95,902 6/8/2020
1.0.0-beta0008 407,329 5/13/2020
Loading failed