RecursiveAI.OneImage
1.10.4
Prefix Reserved
See the version list below for details.
dotnet add package RecursiveAI.OneImage --version 1.10.4
NuGet\Install-Package RecursiveAI.OneImage -Version 1.10.4
<PackageReference Include="RecursiveAI.OneImage" Version="1.10.4" />
<PackageVersion Include="RecursiveAI.OneImage" Version="1.10.4" />
<PackageReference Include="RecursiveAI.OneImage" />
paket add RecursiveAI.OneImage --version 1.10.4
#r "nuget: RecursiveAI.OneImage, 1.10.4"
#:package RecursiveAI.OneImage@1.10.4
#addin nuget:?package=RecursiveAI.OneImage&version=1.10.4
#tool nuget:?package=RecursiveAI.OneImage&version=1.10.4
OneImage
A pure-managed .NET image library: one-line thumbnails, crops and
conversions, and lazy, tiled, streaming load, edit and render on the
same engine. PNG, JPEG, WebP, GIF, TIFF, BMP and ICO, with ICC color
management. Pure C# with no dependency beyond .NET itself; untrusted
files are read through bounds-checked managed code. It also includes
vector drawing and a layered document model (OneImage.Layers: pixel,
group, fill and adjustment layers, masks, clipping and blend modes,
rendered on demand).
How many times faster OneImage is than ImageSharp 3.1.12 on each benchmark task (log scale, higher is better; slower tasks and ties are marked):
Full results, with memory, the losses and the method
Install
dotnet add package RecursiveAI.OneImage
The package is RecursiveAI.OneImage; the namespace is OneImage
(using OneImage;).
Target framework net10.0.
Quick start
using OneImage;
// A 400 px wide thumbnail, upright, in sRGB, without EXIF/GPS, written as WebP.
Image.Thumbnail("in.jpg", 400).Save("thumb.webp");
// Load, edit, save. Nothing is decoded until Save.
Image.Load("in.jpg")
.Resize(width: 1200)
.Rotate(90)
.Save("out.png");
// Format and quality.
Image.Load("in.png").Save("out.jpg", new SaveOptions { EncoderOptions = new JpegEncoderOptions { Quality = 85 } });
The format of Save follows the file extension. For streams and buffer
writers, name it: image.Save(stream, PngFormat.Instance).
What is new in 1.10.4
- Fixed: 16-bit and floating-point images in linear light could still differ by one bit between platforms. The remaining colour transfer tables and functions (16-bit decode, linear-to-8-bit, sRGB for 16-bit and float pixels, gamma, levels, ICC curves, the Lab cube root) no longer use the platform math library; they use our own correctly rounded power and cube root, so results are the same on every platform. Tables keep their 1.10.3 values; 16-bit and float results change on x64 by at most one unit in the last place in 0.002% of values, where the old math library rounded wrongly.
What was new in 1.10.3
- Fixed: linear-light results on 8-bit images could differ by one bit between platforms. The sRGB tables used by resizes, blurs and other linear-light operations were computed at startup with the platform math library, which rounds slightly differently on macOS arm64. They are now stored as data, so these operations give the same bytes on every platform. Results on x64 are unchanged.
What was new in 1.10.2
- Fixed: a blur much wider than the image could crash the process.
GaussianBlur,BoxBlurandSharpenon an image only a few pixels across compared with sigma or radius recursed until the stack overflowed. They now blur such images directly with the documented kernel, and any finite sigma is accepted. Every blur that finished before gives the same bytes.
What was new in 1.10.1
- Fixed: valid PNG files could fail to decode (every release since 1.0.0). The deflate decoder could go out of step on compressed data that uses long codes, which some optimizing encoders produce, and the read then failed with a format error. TIFF Deflate, PSD ZIP, SVGZ and WOFF use the same decoder. In tests, whole-image reads of affected files always failed rather than returning wrong pixels. A crop, region or band read could, rarely, return wrong pixels in its last rows. See the changelog for the measurements.
- Complete reads of deflate data now verify the checksum when it is present: a wrong checksum is an error, while a missing or cut-short one after complete data is still accepted. Reads of part of a PNG cannot verify it and are covered by the chunk CRCs only.
- Fixed: an image loaded from a
Streamcould have its compressed bytes recycled while a decode was still reading them.
What was new in 1.10.0
- Text builds on OneFont.
RecursiveAI.OneImage.Textnow usesRecursiveAI.OneFont1.2 or later for font parsing, OpenType shaping, bidi and line breaking instead of its own copy. Rendering is byte for byte the same, measuring a paragraph allocates about 40% less, and the public API is unchanged. - Fixed:
TextShaping.ShapeRunclusters no longer leave gaps when the shaper drops characters, and a character mapped past the font's glyph count is drawn as the missing glyph.
What was new in 1.9.0
- Give back decoded pixels per frame.
ImageFrame.ReleaseDecodedPixels()is public, and releasing now also clears the cached tiles of operations above the decode and of TIFF decodes, and reaches the region plane throughframe.ToImage(). - Region reads without the plane, per call.
CopyPixelsTo(destination, rect, useRegionCache: false)reads a band or region of a large JPEG or PNG holding only the decoder's few tile rows, without changing the process-wideImageEngine.RegionCacheBytes. - Output is byte for byte the same as 1.8.1.
What was new in 1.8.1
- Color to gray is about 5x faster, with identical output. Reading an 8-bit RGB or RGBA image as
Gray8,Gray16or gray with alpha uses an integer vector path that gives exactly the bytes of the previous float path (checked over every RGB value and every alpha). An A4 JPEG read asGray8takes 11.5 ms instead of 58 ms (10 ms asRgb24).
What was new in 1.8.0
- Repeated region reads no longer decode again. From the second
CopyPixelsToof a sub-rectangle of a large JPEG or PNG, the rows read so far are kept in a bounded per-image plane in the requested format, so further band and region reads are copies. Load plus 20 random region reads of an A4 page: JPEG 47 to 26 ms, PNG 94 to 42 ms, with peak memory 31 to 10 MB above baseline.ImageEngine.RegionCacheBytes(64 MiB per frame, 0 turns it off) bounds it andImage.ReleaseDecodedPixels()gives it back. - The first
Loadcosts less memory. The first PNG load in a process adds 2.3 MB instead of 11 MB, and the first JPEG load 2.5 MB instead of 6.1 MB. - Output is byte for byte the same as 1.7.0.
Learn more
- Guide: the lazy model, errors, operations,
Canvas, metadata, color, animation, limits, AOT and trimming. - Layers: layered documents that render on demand, with
incremental re-rendering and an optional disk-spill store. Photoshop files
load into them through the separate
RecursiveAI.OneImage.Psdpackage (PSD page). - Migrating from ImageSharp and System.Drawing
- How OneImage compares, including where the others are the better fit
- Benchmarks and the method
- Changelog and security policy
License
Licensed under either of MIT or Apache-2.0 at your option.
Copyright (c) Recursive AI, LLC.
| 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 (14)
Showing the top 5 NuGet packages that depend on RecursiveAI.OneImage:
| Package | Downloads |
|---|---|
|
RecursiveAI.OneImage.Text
Fonts and text for OneImage: loads TrueType, OpenType (CFF), TrueType Collection, WOFF and WOFF2 fonts, measures and lays out text, and draws it onto images and canvases through the vector drawing layer. |
|
|
RecursiveAI.OneImage.Svg
SVG support for OneImage: reads static SVG (shapes, paths, gradients, patterns, clipping, masks, markers, filters and text) as an image format, rendered directly at the requested output size. |
|
|
RecursiveAI.OneGame.Atlas
Atlas pages and the SVG and image atlas for the 2D renderer. |
|
|
RecursiveAI.OneGame.Gltf
glTF 2.0 import: scenes, meshes, materials, skins and animations, safe on untrusted input. |
|
|
RecursiveAI.OneGame.Host
The game host: window, input, fixed-step simulation, UI and render stage for one game, windowed or headless. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.11.1 | 385 | 11/6/2026 |
| 1.11.0 | 167 | 11/6/2026 |
| 1.10.5 | 292 | 11/5/2026 |
| 1.10.4 | 677 | 10/30/2026 |
| 1.10.3 | 148 | 10/30/2026 |
| 1.10.2 | 2,150 | 10/27/2026 |
| 1.10.1 | 4,590 | 10/25/2026 |
| 1.10.0 | 669 | 10/24/2026 |
| 1.9.0 | 153 | 10/24/2026 |
| 1.8.1 | 156 | 10/24/2026 |
| 1.8.0 | 158 | 10/24/2026 |
| 1.7.0 | 817 | 10/23/2026 |
| 1.6.0 | 153 | 10/23/2026 |
| 1.5.0 | 150 | 10/23/2026 |
| 1.4.0 | 147 | 10/23/2026 |
| 1.3.0 | 144 | 10/23/2026 |
| 1.2.0 | 133 | 10/22/2026 |
| 1.1.0 | 1,033 | 10/22/2026 |
| 1.0.0 | 108 | 10/22/2026 |
See CHANGELOG.md in the repository.