StbiSharp 1.0.12

There is a newer version of this package available.
See the version list below for details.
Install-Package StbiSharp -Version 1.0.12
dotnet add package StbiSharp --version 1.0.12
<PackageReference Include="StbiSharp" Version="1.0.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StbiSharp --version 1.0.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StbiSharp, 1.0.12"
#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.0.12

// Install StbiSharp as a Cake Tool
#tool nuget:?package=StbiSharp&version=1.0.12
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. It supports JPEG, PNG, 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.

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.0.13 186,876 11/6/2020
1.0.12 29,057 6/24/2020
1.0.11 40,291 12/17/2019
1.0.10 3,334 11/29/2019
1.0.9 276 11/29/2019
1.0.8 1,195 11/21/2019
1.0.7 227 11/19/2019
1.0.6 217 11/19/2019
1.0.4 226 11/17/2019
1.0.3 227 11/17/2019
1.0.2 224 11/17/2019
1.0.1 243 11/17/2019

Automated release.