StbiSharp 1.2.1

.NET Core 2.0 .NET Standard 2.0
Install-Package StbiSharp -Version 1.2.1
dotnet add package StbiSharp --version 1.2.1
<PackageReference Include="StbiSharp" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StbiSharp --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StbiSharp, 1.2.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install StbiSharp as a Cake Addin
#addin nuget:?package=StbiSharp&version=1.2.1

// Install StbiSharp as a Cake Tool
#tool nuget:?package=StbiSharp&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


A C# wrapper around the single-header image-loading library stb_image.h as well as qoi.h. It supports JPEG, PNG, QOI, BMP, GIF, HDR, PIC, PNM, PSD, and TGA (for some formats only a subset of features; consult stb_image.h for details).

You can find the source code of this package on GitHub.


Grab StbiSharp from nuget, then load an image as follows:

public void doSomethingWithImage()
    using (var stream = File.OpenRead("some-image.jpg"))
    using (var memoryStream = new MemoryStream())
        StbiImage image = Stbi.LoadFromMemory(memoryStream, 4);

        // Use image.Width, image.Height,
        // image.NumChannels, and image.Data.

If the encoded image is directly available in memory, no file stream needs to be used.


StbiSharp is available under the BSD 3-clause license. TL;DR you can do almost whatever you want as long as you include the original copyright and license notice in any copy of the software and the source code.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on StbiSharp:

Package Downloads

A 2D application/game framework written with rhythm games in mind.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on StbiSharp:

Repository Stars
A game framework written with osu! in mind.
Version Downloads Last updated
1.2.1 483 3/18/2022
1.2.0 83 3/16/2022
1.1.1 229 3/1/2022
1.1.0 130,639 1/31/2022
1.0.13 404,240 11/6/2020
1.0.12 35,125 6/24/2020
1.0.11 55,377 12/17/2019
1.0.10 4,042 11/29/2019
1.0.9 358 11/29/2019
1.0.8 1,410 11/21/2019
1.0.7 305 11/19/2019
1.0.6 293 11/19/2019
1.0.4 308 11/17/2019
1.0.3 304 11/17/2019
1.0.2 307 11/17/2019
1.0.1 325 11/17/2019

Automated release.