SharpAstro.Png
2.30.61
See the version list below for details.
dotnet add package SharpAstro.Png --version 2.30.61
NuGet\Install-Package SharpAstro.Png -Version 2.30.61
<PackageReference Include="SharpAstro.Png" Version="2.30.61" />
<PackageVersion Include="SharpAstro.Png" Version="2.30.61" />
<PackageReference Include="SharpAstro.Png" />
paket add SharpAstro.Png --version 2.30.61
#r "nuget: SharpAstro.Png, 2.30.61"
#:package SharpAstro.Png@2.30.61
#addin nuget:?package=SharpAstro.Png&version=2.30.61
#tool nuget:?package=SharpAstro.Png&version=2.30.61
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 (1)
Showing the top 1 NuGet packages that depend on SharpAstro.Png:
| Package | Downloads |
|---|---|
|
SharpAstro.Tiff
Pure-managed TIFF reader/writer for .NET. Supports multi-page, 8/16/32-bit uint and IEEE-Float samples, Uncompressed/Deflate/ZlibPkzip, contig planar config, SampleFormat/SMin/SMax/ICC round-trip, both II and MM byte order. AOT-compatible. |
GitHub repositories
This package is not used by any popular GitHub repositories.