GoldSrcSprite 1.0.1

A .NET Standard library for handling GoldSrc engine .spr files

Install-Package GoldSrcSprite -Version 1.0.1
dotnet add package GoldSrcSprite --version 1.0.1
<PackageReference Include="GoldSrcSprite" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GoldSrcSprite --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

GoldSrcSprite

GoldsrcSprite is a simple .NET Standard library to handle GoldSrc engine sprite (.spr) files.

Usage Examples

// Load sprite
var sprite = GoldSrcSprite.FromFile("sprite.spr");

// Get bitmap of the first frame
using(var bmp = sprite.Frames[0].GetBitmap()) {
	// Save as bmp
    bmp.Save("sprite.bmp");
}

// Save sprite
sprite.SaveToFile("sprite.spr");

About .spr files

The format itself is flexible, however keep in mind that game engines might not load the most extreme cases.

  • A sprite can only use 256 colors with it's own palette
  • Can specify how the sprite should be oriented and rendered
  • Each sprite can contain multiple frames
  • Each frame share the same palette
  • Each frame can be different sizes and have a different center origin point

GoldSrcSprite

GoldsrcSprite is a simple .NET Standard library to handle GoldSrc engine sprite (.spr) files.

Usage Examples

// Load sprite
var sprite = GoldSrcSprite.FromFile("sprite.spr");

// Get bitmap of the first frame
using(var bmp = sprite.Frames[0].GetBitmap()) {
	// Save as bmp
    bmp.Save("sprite.bmp");
}

// Save sprite
sprite.SaveToFile("sprite.spr");

About .spr files

The format itself is flexible, however keep in mind that game engines might not load the most extreme cases.

  • A sprite can only use 256 colors with it's own palette
  • Can specify how the sprite should be oriented and rendered
  • Each sprite can contain multiple frames
  • Each frame share the same palette
  • Each frame can be different sizes and have a different center origin point

Release Notes

* Fixed issue when getting bitmap from frame with stride padding

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 269 10/14/2018
1.0.0 252 10/14/2018