SharpAstro.Tiff
3.4.471
See the version list below for details.
dotnet add package SharpAstro.Tiff --version 3.4.471
NuGet\Install-Package SharpAstro.Tiff -Version 3.4.471
<PackageReference Include="SharpAstro.Tiff" Version="3.4.471" />
<PackageVersion Include="SharpAstro.Tiff" Version="3.4.471" />
<PackageReference Include="SharpAstro.Tiff" />
paket add SharpAstro.Tiff --version 3.4.471
#r "nuget: SharpAstro.Tiff, 3.4.471"
#:package SharpAstro.Tiff@3.4.471
#addin nuget:?package=SharpAstro.Tiff&version=3.4.471
#tool nuget:?package=SharpAstro.Tiff&version=3.4.471
SharpAstro Codecs
A family of pure-managed, AOT-compatible image-codec packages for .NET 10 — no native binaries.
Each format ships as an independent NuGet, and SharpAstro.Codecs is a thin facade that sniffs a
byte stream by its magic bytes and dispatches to the right decoder, so a consumer can reference one
package instead of cherry-picking codecs.
Formats: PNG (read/write), JPEG (baseline + progressive decode, incl. scaled 1/2–1/8 LOD), TIFF (read/write), JPEG XR (read/write, jxrlib-exact), OpenEXR (read/write), JPEG XL (read/write), plus EXIF reading and a bundled sRGB ICC profile. See CODECS.md for the full per-package decode/encode matrix and how to pick the right one.
All packages target net10.0, are IsAotCompatible, ship SourceLink debugging, and publish in
lockstep (shared Major.Minor + CI run-number patch).
NuGet
# One facade for sniff-and-decode (PNG + JPEG today):
dotnet add package SharpAstro.Codecs
# ...or reference just the format(s) you need:
dotnet add package SharpAstro.Png
dotnet add package SharpAstro.Jxr
Usage
Decode any supported still image through the facade — sniff the header, size a buffer, decode into it:
using SharpAstro.Codecs;
var bytes = File.ReadAllBytes(path);
if (ImageCodecs.TryReadInfo(bytes, out var info))
{
var rgba = new byte[info.Width * info.Height * 4];
ImageCodecs.TryDecodeIntoRgba8(bytes, rgba); // zero-copy into your buffer
// ...or ImageCodecs.TryDecode(bytes, out IDecodedImage img) for the full-fidelity raster.
}
Each codec is also usable directly — e.g. PngReader / PngWriter, JpegDecoder.Decode / DecodeTo,
TiffReader / TiffWriter, JxrImageCodec, ExrImageCodec, JxlImageCodec. See CODECS.md.
Building from source
git clone https://github.com/SharpAstro/Codecs
cd Codecs
dotnet build Codecs.JustTests.sln -c Release
dotnet test Codecs.JustTests.sln -c Release
Requires the .NET 10 SDK.
License
Unlicense (public domain).
Credits
This repository began as a fork of StbSharp/StbImageSharp
(Roman Shapiro's C# port of Sean Barrett's stb_image.h, via the
Hebron C-to-C# transpiler). SharpAstro.Jpeg's decoder was
ported from and validated byte-exact against that reference decoder before the stb port itself was
retired from the repo.
| 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
- SharpAstro.Png (>= 3.4.471)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on SharpAstro.Tiff:
| Package | Downloads |
|---|---|
|
TianWen.Lib
Package Description |
|
|
SharpAstro.Exif
Pure-managed EXIF metadata reader for .NET. Parses EXIF blobs from JPEG (APP1), TIFF (sub-IFD), and PNG (eXIf chunk) — all of which share the same TIFF-IFD structure. Strongly-typed projection of well-known tags + raw tag map for the long tail / vendor MakerNote. |
|
|
FC.SDK.Raw
Canon CR2 / CR3 raw-file decoder — pure managed C#, no external libraw / dcraw / EDSDK. Sibling to FC.SDK (Canon PTP device communication): one package for talking to the camera, one for decoding the files it writes. |
|
|
SharpAstro.Jxr
Pure-managed JPEG XR (ITU-T T.832 / ISO/IEC 29199-2) encoder/decoder for .NET. AOT-compatible. The codec core is ported faithfully from Microsoft's jxrlib reference implementation and validated bit-exactly against it (byte-for-byte vs JxrEncApp; round-trips through JxrDecApp and Windows Photo / WIC). Reuses SharpAstro.Tiff for the T.833 .jxr container. Current pipeline: single-tile spatial YUV444 BD8 RGB, lossless and lossy, all three overlap levels. |
|
|
SharpAstro.Codecs
Image-codec facade over the SharpAstro codec family: sniff a byte stream's format by its magic-byte signature and dispatch to the matching decoder (PNG, JPEG, TIFF, JPEG XR, OpenEXR, JPEG XL), returning a codec-neutral IDecodedImage (fidelity tier: native bit depth + ColorEncoding colour signalling, with a ToFloats() RGBA float32 view) or decoding zero-copy into a caller-provided 8-bit RGBA buffer (display tier, integer-sample formats). AOT-compatible. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.6.531 | 0 | 7/5/2026 |
| 3.5.511 | 0 | 7/5/2026 |
| 3.4.491 | 0 | 7/5/2026 |
| 3.4.471 | 22 | 7/5/2026 |
| 3.4.451 | 30 | 7/5/2026 |
| 3.4.431 | 39 | 7/4/2026 |
| 3.4.411 | 41 | 7/4/2026 |
| 3.3.391 | 355 | 6/10/2026 |
| 3.3.361 | 303 | 6/1/2026 |
| 3.3.341 | 46 | 5/31/2026 |
| 3.2.311 | 104 | 5/30/2026 |
| 3.2.291 | 48 | 5/30/2026 |
| 3.2.271 | 54 | 5/30/2026 |
| 3.2.251 | 42 | 5/30/2026 |
| 3.1.231 | 52 | 5/30/2026 |
| 3.0.221 | 42 | 5/30/2026 |
| 3.0.211 | 41 | 5/30/2026 |
| 3.0.191 | 48 | 5/24/2026 |
| 3.0.181 | 188 | 5/24/2026 |
| 3.0.171 | 42 | 5/24/2026 |