StbiSharp 1.0.12

A C# wrapper of the single-header stb_image.h image-loading library.

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.

StbiSharp

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.

Usage

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())
    {
        stream.CopyTo(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.

License

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.

StbiSharp

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.

Usage

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())
    {
        stream.CopyTo(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.

License

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.

Release Notes

Automated release.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on StbiSharp:

Package Downloads
ppy.osu.Framework
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
ppy/osu-framework
A game framework written with osu! in mind.

Version History

Version Downloads Last updated
1.0.12 12,164 6/24/2020
1.0.11 26,249 12/17/2019
1.0.10 1,863 11/29/2019
1.0.9 143 11/29/2019
1.0.8 752 11/21/2019
1.0.7 93 11/19/2019
1.0.6 86 11/19/2019
1.0.4 97 11/17/2019
1.0.3 97 11/17/2019
1.0.2 87 11/17/2019
1.0.1 99 11/17/2019