oneimage
An image library for .NET, written from scratch in C# with no dependency beyond .NET itself. One-line thumbnails, crops and conversions, on a lazy, tiled engine.
A quick look
Operations only record what to do. Pixels are computed tile by tile when you save, so a 24 MP photo becomes a thumbnail without ever being held at full size.
Read the guideusing OneImage; // 400 px thumbnail, upright, no GPS. Image.Thumbnail("in.jpg", 400) .Save("thumb.webp"); // Nothing is decoded until Save. Image.Load("in.jpg") .Resize(width: 1200) .Rotate(90) .Save("out.png");
What it does
Lazy, tiled and streaming
Resize, crop and the rest are applied tile by tile on save. JPEGs decode at 1/2, 1/4 or 1/8 scale when that is enough.
One-liners and a canvas
Image.Thumbnail for the common job; an immutable Image pipeline and a mutable tiled Canvas when you need to edit pixels.
Color and metadata
ICC v2 and v4 profiles, CMYK to sRGB and resampling in linear light. EXIF orientation is applied for you, and thumbnails strip GPS by default.
Safe on files you didn’t write
Parsers and decoders are bounds-checked C#, and every decoder is fuzzed. Size limits are on by default and checked from headers before anything large is allocated.
Faster than ImageSharp on most tasks
Against ImageSharp 3.1.12, oneimage is faster on every benchmark task but two. Watermarking is a tie. CMYK JPEG to sRGB is 1.64× slower, because ImageSharp skips the ICC conversion that oneimage applies.
Native wrappers win some tasks: NetVips is about 3× faster on multi-page TIFF reads and ahead on JPEG encoding and one PNG encode input, and SkiaSharp decodes GIFs faster. A JPEG thumbnail uses about 1 MiB more peak memory than ImageSharp.
Every result and the methodWall-clock time, log scale, longer is better. Bars left of 1× are slower; the hatched bar is the one slower task.
Measured with BenchmarkDotNet on one shared workstation. Local measurements, not promises for your hardware.
The package
- Formats
PNG, JPEG, WebP, GIF, TIFF, BMP and ICO. The format of
Savefollows the file extension. - ASP.NET Core
RecursiveAI.OneImage.Webresizes images from the URL, with a disk cache, signed URLs and request limits. - Migration
A guide for moving from ImageSharp or System.Drawing.
- .NET
.NET 10. NativeAOT and trimming are supported. MIT or Apache-2.0.
- How it was made
AI agents designed, wrote and benchmarked it on Alera; Kurtis decided what to build.