cfEngine.AtlasPack
0.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package cfEngine.AtlasPack --version 0.1.1
NuGet\Install-Package cfEngine.AtlasPack -Version 0.1.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="cfEngine.AtlasPack" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="cfEngine.AtlasPack" Version="0.1.1" />
<PackageReference Include="cfEngine.AtlasPack" />
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.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: cfEngine.AtlasPack, 0.1.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.
#:package cfEngine.AtlasPack@0.1.1
#: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.1.1
#tool nuget:?package=cfEngine.AtlasPack&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AtlasPacker
This README is generated by AI, if there are any mistakes or missing information, please open an issue or PR to correct it.
AtlasPacker 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 atlascontext.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 anAtlasImage
andAtlasContext
AtlasContext
: Read-only mapping from image name toRect
AtlasImage
: Stores PNG image data as abyte[]
Rect
: Simple struct withX
,Y
,Width
,Height
Main API (Static)
AtlasPacker.GetImages(string directory) : IReadOnlyList<string>
AtlasPacker.TryPackAtlas(ReadOnlySpan<string> sourceImagePaths, out AtlasPack? atlasPack) : bool
AtlasPacker.TryPackAtlas(ReadOnlySpan<string> sourceImagePaths, string atlasPath) : bool
AtlasPacker.TryPackAtlasAsFolder(ReadOnlySpan<string> sourceImagePaths, string folderPath) : bool
AtlasPacker.LoadAtlas(string atlasPath) : AtlasPack
Output Files
atlas.png
: Packed PNG imagecontext.json
: Serialized dictionary with image bounds usingSystem.Text.Json
Dependencies
- RectpackSharp
- ImageSharp
System.IO.Compression
System.Text.Json
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
andcontext.json
- Use
AtlasPacker.LoadAtlas()
to read back the.atlas
into memory
Generated from actual implementation without assumptions or fabricated usage.
Product | Versions 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.
-
net8.0
- RectpackSharp (>= 1.2.0)
- SixLabors.ImageSharp (>= 3.1.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.