- ASP.NET 服务端做上传图片的缩放、裁剪、格式转换:System.Drawing.Common 在非 Windows 上已不被官方支持,这里是纯托管替代,容器镜像里不用装 libgdiplus
- 需要读 EXIF、处理 JPEG/PNG/GIF/TIFF/BMP 的批处理管线:一个 NuGet 包覆盖编解码和像素操作,不用为每种格式拼不同的原生绑定
- 跨平台桌面或 IoT 场景做程序化绘图(画布、文字、形状):不依赖 Skia/ Cairo 的原生二进制,ARM 小设备上省掉交叉编译原生库的麻烦
- 需要自己写像素级算法、复用底层构建块而不是只调高层 API:库本身暴露了可扩展的 processor 结构
专家点评
上手难度:进阶更新于 2026-11-11全托管 C# 图像编解码与处理库,在 .NET 服务端顶替 System.Drawing 和原生 libgdiplus
适用场景
踩坑
- 商业闭源使用会撞上 Six Labors Split License:README 明说商业使用需购买许可,选型评审阶段就要确认,不要等上线前才发现;这也是它离开 .NET Foundation 的直接原因,HN 上那条 128 分讨论就是围绕这次许可变更
- WebP 支持是 issue 区反应数最高的一条(76 反应、68 评论),如果你的输入源里有大量 WebP,先确认当前版本的实际支持程度再决定,不要按 topics 列表里的 webp 标签想当然
- 从源码构建的门槛比 NuGet 安装高不少:需要 .NET 8 SDK、初始化 Git 子模块和 Git LFS,Windows 上还要开 git 长路径支持;只做二次开发或打补丁的人才会撞上
- 跨大版本升级要预留时间:issue 里有专门的 pixel processing breaking changes 讨论帖,像素处理 API 有过不兼容调整,锁版本前先看迁移说明
同类对比
SkiaSharp 在需要高质量文字渲染、复杂矢量绘制或极致解码性能时更合适,代价是引入原生依赖;只做 Windows 且不想改代码的老项目可以继续用 System.Drawing.Common,但跨平台部署这条路已经走不通
dotnet add package SixLabors.ImageSharpREADME 未说明硬件要求,仅说明基于 .NET 8,可在设备、云和嵌入式/IoT 场景运行
项目说明
由 README 自动翻译提炼面向 .NET 的高性能全托管跨平台 2D 图形与图像处理库,覆盖设备、云和嵌入式场景
面向 .NET 的现代跨平台 2D 图形库,无需依赖系统原生组件即可完成图片解码、编码、绘制与 EXIF 处理。
核心能力
- 全托管实现,无需原生依赖即可跨平台运行
- 提供高层图像处理 API 与可扩展的低层构建块
- 基于 .NET 8 构建,适配设备、云与 IoT 场景
- 支持通过 NuGet 安装稳定版,MyGet/Feedz.io 获取开发版
容易踩的坑
采用 Six Labors Split License 1.0,商业使用需购买商业许可;源码构建需安装 .NET 8 SDK 并初始化 Git 子模块与 Git LFS;Windows 下构建需开启 git 长路径支持
- v4.1.3最新正式版2026-10-09 · 2026-10-09 09:02 UTC
What's Changed
- Fix EXR encoder to write scaled values by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3195
- Fix grayscale ICC profile conversion by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3199
- Fix ICC rendering intent consistency and clamp sampled curves by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3200
- Backport PNG cancellation buffer disposal fix to v4 by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3209
- Backport lossy WebP buffer growth fix to v4 by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3210
- Update v4 licensing infrastructure and security policy by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3211
Full Changelog: https://github.com/SixLabors/ImageSharp/compare/v4.1.2...v4.1.3
- v3.2.02026-10-09 · 2026-10-09 08:56 UTC
查看更新说明
What's Changed
- [3.1] Use macos-26-intel on CI by @antonfirsov in https://github.com/SixLabors/ImageSharp/pull/3087
- Backport: V3 - Throw explicit InvalidImageContentException when BMP BPP is invalid. by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3068
- [3.1] Backport #3075 - Add check, if Offset is greater then stream length when reading bitmap colorMapSize by @antonfirsov in https://github.com/SixLabors/ImageSharp/pull/3091
- v3: Backport. Fix JPEG SIMD slicing and padding length handling by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3106
- Backport v3 security fixes and license enforcement by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3208
Full Changelog: https://github.com/SixLabors/ImageSharp/compare/v3.1.12...v3.2.0
- v4.1.22026-09-14 · 2026-09-14 04:18 UTC
查看更新说明
What's Changed
- Harden codec and metadata input validation by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3187
- Fix TIFF decoding of legacy 8-bit color maps by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3189
Full Changelog: https://github.com/SixLabors/ImageSharp/compare/v4.1.1...v4.1.2
- v4.1.12026-08-20 · 2026-08-20 06:22 UTC
查看更新说明
What's Changed
- Fix CCITT decompressor bounds checks and error handling by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3176
Full Changelog: https://github.com/SixLabors/ImageSharp/compare/v4.1.0...v4.1.1
- v4.1.02026-08-11 · 2026-08-11 23:21 UTC
查看更新说明
What's Changed
- GIF: background handling & quantizer overflow fix by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3133
- Validate PBM max pixel value by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3134
- Add support for Apple CgBI PNG images by @Erik-White in https://github.com/SixLabors/ImageSharp/pull/3136
- Fix GIF transparency handling and dither by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3143
- Bump codecov/codecov-action from 6 to 7 by @dependabot[bot] in https://github.com/SixLabors/ImageSharp/pull/3141
- Add BlendWithCoverage overloads. Optimize Rgba32 compatible shuffling. by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3150
- Bump actions/checkout from 6 to 7 by @dependabot[bot] in https://github.com/SixLabors/ImageSharp/pull/3146
- Bump actions/cache from 5 to 6 by @dependabot[bot] in https://github.com/SixLabors/ImageSharp/pull/3149
- Fix convolution sampling for bounds smaller than the kernel radius by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3152
- Enhance pixel formats and associated-alpha operations with optimizations by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3154
- Bump actions/setup-dotnet from 5 to 6 by @dependabot[bot] in https://github.com/SixLabors/ImageSharp/pull/3155
- Fix degeneracy check for resize transforms by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3157
- Improvements to Apple CgBI PNG handling by @Erik-White in https://github.com/SixLabors/ImageSharp/pull/3137
- Clone TIFF profiles into image metadata by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3159
- Add AOT compiler seeds for pixel formats and ICO, CUR, QOI codecs by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3160
- Normalize SIMD pipelines using TensorPrimitives_ by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3161
- Add ANI decoder support by @Poker-sang in https://github.com/SixLabors/ImageSharp/pull/2899
- Remove AntialiasThreshold from GraphicsOptions by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3162
- Add plus and extended pixel blend modes by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3163
- Fix 16-bit binary PBM sample byte order by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3164
- Make MemoryAllocator limits configurable and extensible by @JimBobSquarePants in https://github.com/SixLabors/ImageSharp/pull/3165
New Contributors
- @Erik-White made their first contribution in https://github.com/SixLabors/ImageSharp/pull/3136
Full Changelog: https://github.com/SixLabors/ImageSharp/compare/v4.0.0...v4.1.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
ImageSharp is a high-performance, fully managed, cross-platform 2D graphics API.
ImageSharp is a mature, fully featured, high-performance image processing and graphics library for .NET, built for workloads across device, cloud, and embedded/IoT scenarios.
Designed from the ground up to balance performance, portability, and ease of use, ImageSharp provides a powerful yet approachable API for common image processing tasks, along with the low-level building blocks needed to extend the library for specialized workflows.
Built against .NET 8, ImageSharp can be used in device, cloud, and embedded/IoT scenarios.
License
- ImageSharp is licensed under the Six Labors Split License, Version 1.0
Support Six Labors
Support the efforts of the development of the Six Labors projects.
- Purchase a Commercial License :heart:
- Become a sponsor via GitHub Sponsors :heart:
- Become a sponsor via Open Collective :heart:
Documentation
- Detailed documentation for the ImageSharp 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
- Do you have questions? Please join our Discussions Forum. Do not open issues for questions.
- For feature ideas please join our Discussions Forum and we'll be happy to discuss.
- Please read our Contribution Guide before opening issues or pull requests!
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 (Feedz.io) |
|---|---|---|
SixLabors.ImageSharp |
Manual build
If you prefer, you can compile ImageSharp yourself (please do and help!)
- Using Visual Studio 2022
- Make sure you have the latest version installed
- Make sure you have the .NET 8 SDK installed
Alternatively, you can work from command line and/or with a lightweight editor on both Linux/Unix and Windows:
To clone ImageSharp locally, click the "Clone in [YOUR_OS]" button above or run the following git commands:
git clone https://github.com/SixLabors/ImageSharp
Then set the following config to ensure blame commands ignore mass reformatting commits.
git config blame.ignoreRevsFile .git-blame-ignore-revs
If working with Windows please ensure that you have enabled long file paths in git (run as Administrator).
git config --system core.longpaths true
This repository uses Git Large File Storage. Please follow the linked instructions to ensure you have it set up in your environment.
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.
Useful tools for development and links to specifications can be found in our wikipage: Useful-tools-and-links.
The ImageSharp Team
Special thanks to JetBrains for supporting us with open-source licenses for their IDEs.