SharpAstro.Jpeg
3.0.81
See the version list below for details.
dotnet add package SharpAstro.Jpeg --version 3.0.81
NuGet\Install-Package SharpAstro.Jpeg -Version 3.0.81
<PackageReference Include="SharpAstro.Jpeg" Version="3.0.81" />
<PackageVersion Include="SharpAstro.Jpeg" Version="3.0.81" />
<PackageReference Include="SharpAstro.Jpeg" />
paket add SharpAstro.Jpeg --version 3.0.81
#r "nuget: SharpAstro.Jpeg, 3.0.81"
#:package SharpAstro.Jpeg@3.0.81
#addin nuget:?package=SharpAstro.Jpeg&version=3.0.81
#tool nuget:?package=SharpAstro.Jpeg&version=3.0.81
SharpAstro.StbImage
SharpAstro fork of StbSharp/StbImageSharp — a pure-managed C# port of Sean Barrett's stb_image.h. Decodes JPG (baseline), PNG, BMP, TGA, PSD, GIF, and HDR without any native binaries.
Why a fork? The SharpAstro family of libraries (DIR.Lib, Fonts.Lib, SdlVulkan.Renderer, …) targets .NET 10, ships AOT-compatible NuGet packages, and is wired into a CI/CD pipeline. This fork brings StbImageSharp into the same convention: net10.0, <IsAotCompatible>true</IsAotCompatible>, centrally-managed package versions, SourceLink debugging, and automated publishing.
The C# source is unchanged from upstream — it's still the Hebron-transpiled stb_image port. Only project scaffolding (csproj, CI, packaging metadata) has been modernised.
NuGet
dotnet add package SharpAstro.StbImage
Namespace is still StbImageSharp to keep call sites identical when migrating off the upstream package.
Usage
using StbImageSharp;
using var stream = File.OpenRead(path);
var image = ImageResult.FromStream(stream, ColorComponents.RedGreenBlueAlpha);
// image.Width, image.Height, image.Data (byte[])
Other entry points: ImageResult.FromMemory(byte[]), ImageInfo.FromStream (header peek), ImageResultFloat.FromStream (HDR), ImageResult.AnimatedGifFramesFromStream.
See the upstream README for richer examples (MonoGame Texture2D, WinForms Bitmap, etc.).
Building from source
git clone https://github.com/SharpAstro/StbImageSharp
cd StbImageSharp
dotnet build StbImageSharp.JustTests.sln -c Release
dotnet test StbImageSharp.JustTests.sln -c Release
Requires the .NET 10 SDK.
License
Unlicense (public domain). Same terms as the upstream port and the original stb library.
Credits
- stb — Sean Barrett's original C image-loader header.
- StbSharp/StbImageSharp — Roman Shapiro's C# port (via Hebron C-to-C# transpiler).
| 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 (4)
Showing the top 4 NuGet packages that depend on SharpAstro.Jpeg:
| Package | Downloads |
|---|---|
|
TianWen.Lib
Package Description |
|
|
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.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. |
|
|
SharpAstro.Jpeg.GainMap
Gain-map ("Ultra HDR") JPEG support: read, assemble, and generate Adobe hdrgm 1.0 / Android Ultra HDR v1 gain-map JPEGs (GContainer XMP + MPF, the form Chromium renders as HDR). Splices metadata around baseline JPEGs from any encoder (the IccInjector pattern), decodes both renditions via SharpAstro.Jpeg, and reconstructs display-adaptive HDR linear floats. Pure-managed, AOT-compatible. |
GitHub repositories
This package is not used by any popular GitHub repositories.