StbiSharp 1.2.1

.NET Core 2.0 .NET Standard 2.0
dotnet add package StbiSharp --version 1.2.1
NuGet\Install-Package StbiSharp -Version 1.2.1
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="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
#r "nuget: StbiSharp, 1.2.1"
#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.
// 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


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 net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.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 net481
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 1,139 3/18/2022
1.2.0 298 3/16/2022
1.1.1 447 3/1/2022
1.1.0 364,423 1/31/2022
1.0.13 537,971 11/6/2020
1.0.12 42,945 6/24/2020
1.0.11 69,504 12/17/2019
1.0.10 5,199 11/29/2019
1.0.9 433 11/29/2019
1.0.8 1,786 11/21/2019
1.0.7 376 11/19/2019
1.0.6 368 11/19/2019
1.0.4 381 11/17/2019
1.0.3 377 11/17/2019
1.0.2 380 11/17/2019
1.0.1 404 11/17/2019

Automated release.