Arlecchino.Pictures
2026.8.5
dotnet add package Arlecchino.Pictures --version 2026.8.5
NuGet\Install-Package Arlecchino.Pictures -Version 2026.8.5
<PackageReference Include="Arlecchino.Pictures" Version="2026.8.5" />
<PackageVersion Include="Arlecchino.Pictures" Version="2026.8.5" />
<PackageReference Include="Arlecchino.Pictures" />
paket add Arlecchino.Pictures --version 2026.8.5
#r "nuget: Arlecchino.Pictures, 2026.8.5"
#:package Arlecchino.Pictures@2026.8.5
#addin nuget:?package=Arlecchino.Pictures&version=2026.8.5
#tool nuget:?package=Arlecchino.Pictures&version=2026.8.5

Picture files read into the pixels the Picture widget draws: PNG, JPEG, BMP, Netpbm, QOI and Targa. Every decoder is written against the format itself, so the package has no dependency
beyond Arlecchino.Core and nothing native to
carry from platform to platform.
Quick start
dotnet add package Arlecchino.Pictures
using Arlecchino.Pictures;
using Arlecchino.Widgets.Pictures;
var bytes = File.ReadAllBytes(path);
if (PictureFormats.Read(bytes) is { } raster)
{
var picture = new Picture();
picture.Show(raster.Pixels, raster.Width, raster.Height);
}
A file is recognized by what is in it rather than by what it is called, since a picture opened from a
file manager is as likely to be named wrongly as rightly. PictureFormats.For says which format
claimed it, which is what a status line shows.
Nothing here throws. What cannot be read comes back as null, and the caller shows the bytes
instead.
What is read
| Format | What of it |
|---|---|
| PNG | every color type and bit depth, interlaced or not |
| JPEG | baseline and progressive, at any sampling, with restart markers |
| BMP | 1, 4, 8, 16, 24 and 32 bits a pixel, plainly written, run-length encoded, or with named masks |
| Netpbm | P1 to P6, as numbers or as bytes, at any depth |
| QOI | all of it |
| Targa | 8, 15, 16, 24 and 32 bits a pixel, with a color map or without, run-length encoded or not |
Alpha is read and then dropped: a terminal has nothing to show it against.
A header states its own size, so a small file can ask for an enormous picture. PictureLimits.Most
is what stands against that: anything larger is refused before a byte is allocated for it.
PictureLimits.Enough is the other half — how many pixels you actually have a use for:
var raster = PictureFormats.Read(bytes, PictureLimits.For(picture.Detail));
A twenty-four megapixel photograph drawn into a terminal pane is twenty-three million pixels nobody sees. JPEG answers such a request by reading each block at a quarter or an eighth of its side — a block is a square of waves, and the flattest few of them are a smaller square of samples for a fraction of the arithmetic. The size it lands on is its own, and never smaller than you asked for.
Every type is trimming- and Native AOT-compatible.
Packages
| Package | Contents |
|---|---|
Arlecchino.Core |
the renderer, no DI, and atoms with their undo history |
Arlecchino |
views, navigation, modals, commands, hosting, DI, async stores, and the generator |
Arlecchino.Pictures |
this one — picture files read into pixels |
Arlecchino.Testing |
ArlecchinoTestHost — the headless host applications write their tests against |
They ship together and always carry the same version.
Links
Documentation · Changelog · Source and issues
MIT.
| Product | Versions 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 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
- Arlecchino.Core (>= 2026.8.5)
-
net8.0
- Arlecchino.Core (>= 2026.8.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
What changed in this version: https://github.com/The1fEst/Arlecchino/blob/master/CHANGELOG.md#202685