LittleToxic.StbImageMetadata
2.30.0-beta.2
This is a prerelease version of LittleToxic.StbImageMetadata.
dotnet add package LittleToxic.StbImageMetadata --version 2.30.0-beta.2
NuGet\Install-Package LittleToxic.StbImageMetadata -Version 2.30.0-beta.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LittleToxic.StbImageMetadata" Version="2.30.0-beta.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LittleToxic.StbImageMetadata" Version="2.30.0-beta.2" />
<PackageReference Include="LittleToxic.StbImageMetadata" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LittleToxic.StbImageMetadata --version 2.30.0-beta.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LittleToxic.StbImageMetadata, 2.30.0-beta.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LittleToxic.StbImageMetadata@2.30.0-beta.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LittleToxic.StbImageMetadata&version=2.30.0-beta.2&prerelease
#tool nuget:?package=LittleToxic.StbImageMetadata&version=2.30.0-beta.2&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LittleToxic.StbImageMetadata
Windows Metadata (.winmd) for stb_image.h (v2.30), enabling use with CsWin32 source generator.
Features
- Complete metadata for stb_image.h public API (image loading, info, HDR detection)
- Includes native stb_image.dll for Windows x64
- Seamless integration with CsWin32
- Supports PNG, JPEG, BMP, TGA, GIF, HDR, PSD, PIC, PNM formats
Installation
Install this package:
dotnet add package LittleToxic.StbImageMetadata --prereleaseInstall CsWin32 (required separately):
dotnet add package Microsoft.Windows.CsWin32 --prerelease
Usage
Create a
NativeMethods.txtfile in your project root:StbiLoad StbiImageFree StbiInfo StbiChannelBuild your project. CsWin32 automatically generates P/Invoke bindings.
Use the generated APIs:
using Windows.Win32; unsafe { int x, y, channels; var data = PInvoke.StbiLoad("photo.png", &x, &y, &channels, 0); // ... work with pixel data ... PInvoke.StbiImageFree(data); }
Requirements
- Windows x64
- Microsoft.Windows.CsWin32 (installed separately)
API Naming Conventions
All C identifiers are converted from snake_case to PascalCase, retaining the Stbi prefix:
- Functions:
stbi_load→StbiLoad,stbi_image_free→StbiImageFree - Types:
stbi_io_callbacks→StbiIOCallbacks - Enums:
stbi_channel→StbiChannel - Enum Members:
STBI_rgb_alpha→StbiChannel.RgbAlpha
Excluded APIs
- All
_from_filevariants (FILE*-based functions) - All
stbi_zlib_decode_*functions
License
MIT License. stb_image.h is public domain / MIT licensed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.30.0-beta.2 | 104 | 3/7/2026 | |
| 2.30.0-beta.1 | 80 | 3/7/2026 |