cfEngine.AtlasPack 0.2.2

dotnet add package cfEngine.AtlasPack --version 0.2.2
                    
NuGet\Install-Package cfEngine.AtlasPack -Version 0.2.2
                    
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="cfEngine.AtlasPack" Version="0.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="cfEngine.AtlasPack" Version="0.2.2" />
                    
Directory.Packages.props
<PackageReference Include="cfEngine.AtlasPack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add cfEngine.AtlasPack --version 0.2.2
                    
#r "nuget: cfEngine.AtlasPack, 0.2.2"
                    
#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.
#:package cfEngine.AtlasPack@0.2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=cfEngine.AtlasPack&version=0.2.2
                    
Install as a Cake Addin
#tool nuget:?package=cfEngine.AtlasPack&version=0.2.2
                    
Install as a Cake Tool

AtlasPack

AtlasPack is a C# class library that packs multiple images into a single texture atlas and stores accompanying metadata (image placement info) in a .zip file or folder format.

Features

  • Loads images from a directory or file list
  • Packs images using RectpackSharp with automatic atlas size computation
  • Outputs a .zip archive (.atlas) or a folder containing:
    • atlas.png: the combined texture atlas
    • context.json: mapping of image names to positions in the atlas
  • Reads back the .atlas format
  • Zero Unity dependency — works as a pure C# library
  • Uses ImageSharp for image handling

Structure

Core Types

  • AtlasPack: Holds an AtlasImage and AtlasContext
  • AtlasContext: Read-only mapping from image name to Rect
  • AtlasImage: Stores PNG image data as a byte[]
  • Rect: Simple struct with X, Y, Width, Height

Main API (Static)

AtlasPacker.GetImages(string directory) : string[]
AtlasPacker.PackAtlas(ReadOnlySpan<string> sourceImagePaths) : AtlasPack?
AtlasPacker.PackAtlas(ReadOnlySpan<string> sourceImagePaths, string atlasPath) : void
AtlasPacker.PackAtlasAsFolder(ReadOnlySpan<string> sourceImagePaths, string folderPath) : void
AtlasPacker.LoadAtlas(string atlasPath) : AtlasPack

Output Files

  • atlas.png: Packed PNG image
  • context.json: Serialized dictionary with image bounds using System.Text.Json

Dependencies

Usage Notes

  • Supported image extensions: bmp, gif, jpg, jpeg, png, tif, tiff
  • RectpackSharp is used for efficient rectangle packing
  • The .atlas format is just a .zip file with two entries: atlas.png and context.json
  • Use AtlasPacker.LoadAtlas() to read back the .atlas into memory

Generated from actual implementation without assumptions or fabricated usage.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.2 0 8/11/2025
0.2.1 94 7/27/2025
0.2.0 228 7/26/2025
0.1.4 233 7/26/2025
0.1.3 230 7/26/2025
0.1.2 247 7/26/2025
0.1.1 247 7/26/2025
0.1.0 248 7/26/2025