PictureSharp 0.7.12
See the version list below for details.
dotnet add package PictureSharp --version 0.7.12
NuGet\Install-Package PictureSharp -Version 0.7.12
<PackageReference Include="PictureSharp" Version="0.7.12" />
<PackageVersion Include="PictureSharp" Version="0.7.12" />
<PackageReference Include="PictureSharp" />
paket add PictureSharp --version 0.7.12
#r "nuget: PictureSharp, 0.7.12"
#:package PictureSharp@0.7.12
#addin nuget:?package=PictureSharp&version=0.7.12
#tool nuget:?package=PictureSharp&version=0.7.12
PictureSharp
A pure managed image processing library for .NET. No native dependencies.
PictureSharp reads, writes and processes JPEG, PNG, WebP, GIF, BMP, ICO and PCX in 100% C# for .NET 10 and later, with no NuGet dependencies, native libraries or P/Invoke. Output is verified pixel for pixel against libwebp, libjpeg-turbo and Pillow.
| Format | Best for | Transparency | Animation | HDR gain maps |
|---|---|---|---|---|
| JPEG | photos | read, write | ||
| PNG | graphics, screenshots | ✔ | ✔ APNG | |
| WebP | the web, lossy or lossless | ✔ | ✔ | |
| GIF | simple animations | ✔ | ✔ | |
| BMP | Windows bitmaps | ✔ | ||
| ICO | favicons, app icons | ✔ | ||
| PCX | legacy files | ✔ | ||
| HEIC ¹ | iPhone photos | ✔ | read | |
| TIFF ² | scans, print, archives | ✔ |
Variants and options for each format are listed in Loading and saving. HEIC and TIFF come from plugin packages, also 100% C#:
¹ PictureSharp.Heif: dotnet add package PictureSharp.Heif
² PictureSharp.Tiff: dotnet add package PictureSharp.Tiff. Reads
and writes multi-page TIFF and BigTIFF; reads also CMYK, YCbCr, CIE L*a*b*, 1- to 32-bit and floating-point samples.
- Resizing, geometry, color adjustments, filters, compositing and EXIF auto-orientation
- Levels, gamma, auto contrast, histograms, trimming, alpha masks and W3C blend modes
- Photo adjustments: exposure, white balance (also from a neutral or automatic), curves, shadows/highlights, clarity, vibrance, vignette, edge-preserving denoise, dust and color-noise removal
- Developing photographed film negatives (color and black-and-white) in optical density
- Conversion of ICC and PNG color descriptions to sRGB, linear-light resize and compositing
- Fast JPEG thumbnails decoded at 1/2, 1/4 or 1/8 scale
- Frame-by-frame reading and writing of GIF, APNG and WebP animations
- Typed EXIF and ICC/XMP metadata, editable without recompressing the image
- HDR photos with gain maps (ISO 21496-1, Apple): reconstruction, tone mapping, editing and saving as JPEG
- Limits for untrusted input and cancellation of all long-running work
- SIMD on x64 and ARM64, bit-identical to the scalar code
- Extensible with format plugins (including HDR gain maps and metadata) and custom processors
- Optional adapter packages for System.Drawing, SkiaSharp and ASP.NET Core
Quick start
using PictureSharp;
using var image = await Image.LoadAsync("photo.jpg");
image.Mutate(x => x
.AutoOrient()
.Resize(1600, 0) // 0 keeps the aspect ratio
.UnsharpMask());
await image.SaveAsync("photo.webp"); // the format comes from the extension
using Image thumbnail = image.Clone(x => x.Thumbnail(256, 256));
thumbnail.Save("thumbnail.png");
Mutate edits the image; Clone returns an edited copy.
Documentation
The public API may still change between 0.x releases.
- Getting started
- Loading and saving · Limits and cancellation
- Image processing · Encoder options · Pixels and interop
- Animation · Metadata · Color management · HDR photos · ICO icons
- Adapters: System.Drawing, SkiaSharp, ASP.NET Core
- Extending PictureSharp · Architecture · Performance
- Command-line sample · Migrating from 0.5.0 · Development · Release notes
Building from source
dotnet build -c Release
dotnet test -c Release
License
PictureSharp is licensed under MIT. It includes ports from libwebp, libjpeg-turbo, zlib and Pillow, and is based in part on the work of the Independent JPEG Group; see THIRD-PARTY-NOTICES.txt.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on PictureSharp:
| Package | Downloads |
|---|---|
|
PictureSharp.AspNetCore
Returns PictureSharp images from ASP.NET Core endpoints with Accept-based WebP/PNG/JPEG negotiation, and reads uploaded images with size limits and request cancellation. |
|
|
PictureSharp.Skia
Copies PictureSharp images to and from SkiaSharp SKBitmap, SKImage and SKPixmap with an explicit alpha policy. |
|
|
PictureSharp.Drawing
Copies PictureSharp images to and from System.Drawing.Bitmap (Windows). |
|
|
PictureSharp.Jxl
Pure C# JPEG XL plugin for PictureSharp. Detects and identifies JPEG XL files (raw codestream and container), decodes still lossy (VarDCT, XYB) and lossless (Modular) images, including recompressed JPEGs, patches, progressive files, photon noise and splines, encodes images lossily (VarDCT with quality, distance and effort 1-9, about as small as cjxl, the default) or losslessly (8-bit or 16-bit Modular, about as small as cjxl -d 0 -e 7), losslessly transcodes sequential and progressive 8-bit JPEG with byte-exact original reconstruction, and reads, writes and edits the ICC profile, EXIF and XMP (also Brotli-compressed). |
|
|
PictureSharp.Heif
HEIC/HEIF format plugin for PictureSharp, written entirely in C#. No native dependencies. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.1 | 155 | 11/2/2026 |
| 0.9.0 | 357 | 10/28/2026 |
| 0.8.5 | 262 | 10/26/2026 |
| 0.8.4 | 105 | 10/26/2026 |
| 0.8.3 | 92 | 10/26/2026 |
| 0.8.2 | 114 | 10/25/2026 |
| 0.8.1 | 109 | 10/23/2026 |
| 0.8.0 | 121 | 10/23/2026 |
| 0.7.13 | 101 | 10/22/2026 |
| 0.7.12 | 92 | 10/22/2026 |
| 0.7.10 | 225 | 10/22/2026 |
| 0.7.9 | 166 | 10/21/2026 |
| 0.7.8 | 140 | 10/21/2026 |
| 0.7.7 | 106 | 10/20/2026 |
| 0.7.6 | 278 | 10/18/2026 |
| 0.7.5 | 94 | 10/18/2026 |
| 0.7.4 | 92 | 10/18/2026 |
| 0.7.3 | 104 | 10/18/2026 |
| 0.7.2 | 95 | 10/17/2026 |
| 0.7.1 | 137 | 10/17/2026 |
0.7.12 fixes dust removal: RemoveDust keeps detail larger than a speck (in 0.7.11 it erased slanted letters of a licence plate) and replaces the ring around a speck, and DevelopNegative removes no dust by default (NegativeOptions.DustSize = 0). Includes everything of 0.7.11, which was not published to NuGet: film negatives (AnalyzeNegative, DevelopNegative, InvertNegative, NegativeCalibration), Curves, WhiteBalance(Rgba32), AutoWhiteBalance, RemoveDust and ReduceColorNoise. Existing API and results unchanged. Notes: https://github.com/art-ix/PictureSharp/blob/v0.7.12/docs/releases/release-0.7.12.md